Help get this topic noticed by sharing it on Twitter, Facebook, or email.

undefined method `name' for nil:NilClass

We are able to log in with the admin account but when a new user account was created and we try to log in we receive the error above. Also the production log logs this error Completed 403 Forbidden in 68.7ms (Views: 0.2ms | ActiveRecord: 8.4ms)
I have posted a sample of the log file below

Started POST "/home/login" for 192.168.1.10 at 2016-03-22 13:09:27
Processing by HomeController#login as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"T1bgKeR2kVpwn1zUmE45o0dm103QY2IfNdq5TLeZLfQ=", "login"=>"tuser", "password"=>"[FILTERED]"}
User Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`login` = 'tuser' LIMIT 1
(0.0ms) BEGIN
(0.1ms) COMMIT
ProjectAssignment Load (0.1ms) SELECT `project_assignments`.* FROM `project_assignments` WHERE `project_assignments`.`user_id` = 31 AND `project_assignments`.`project_id` IS NULL LIMIT 1
undefined method `name' for nil:NilClass
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activerecord-3.2.18/lib/active_record/associations/has_many_association.rb:58:in `cached_counter_attribute_name'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activerecord-3.2.18/lib/active_record/associations/has_many_association.rb:54:in `has_cached_counter?'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activerecord-3.2.18/lib/active_record/associations/has_many_association.rb:37:in `count_records'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activerecord-3.2.18/lib/active_record/associations/collection_association.rb:261:in `size'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activerecord-3.2.18/lib/active_record/associations/collection_association.rb:280:in `empty?'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activerecord-3.2.18/lib/active_record/associations/collection_proxy.rb:46:in `empty?'
/opt/tarantula/rails/app/models/user.rb:61:in `latest_project'
/opt/tarantula/rails/app/controllers/home_controller.rb:14:in `login'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/abstract_controller/base.rb:167:in `process_action'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_controller/metal/rendering.rb:10:in `process_action'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:425:in `_run__3597657215193321334__process_action__1989509634710925086__callbacks'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/abstract_controller/callbacks.rb:17:in `process_action'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_controller/metal/rescue.rb:29:in `process_action'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activesupport-3.2.18/lib/active_support/notifications.rb:123:in `block in instrument'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activesupport-3.2.18/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activesupport-3.2.18/lib/active_support/notifications.rb:123:in `instrument'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activerecord-3.2.18/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/abstract_controller/base.rb:121:in `process'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/abstract_controller/rendering.rb:45:in `process'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_controller/metal.rb:203:in `dispatch'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_controller/metal.rb:246:in `block in action'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:73:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:36:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_dispatch/routing/route_set.rb:608:in `call'
/opt/tarantula/rails/lib/authenticator.rb:41:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/rack-1.4.5/lib/rack/conditionalget.rb:35:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/head.rb:14:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/flash.rb:242:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/cookies.rb:341:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activerecord-3.2.18/lib/active_record/query_cache.rb:64:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in `_run__146540969674541679__call__1834506953182902602__callbacks'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/railties-3.2.18/lib/rails/rack/logger.rb:32:in `call_app'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/railties-3.2.18/lib/rails/rack/logger.rb:18:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/activesupport-3.2.18/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/railties-3.2.18/lib/rails/engine.rb:484:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/railties-3.2.18/lib/rails/application.rb:231:in `call'
/opt/tarantula/rails/vendor/bundle/ruby/2.2.0/gems/railties-3.2.18/lib/rails/railtie/configurable.rb:30:in `method_missing'
/usr/local/rvm/gems/ruby-2.2.1/gems/passenger-5.0.26/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request'
/usr/local/rvm/gems/ruby-2.2.1/gems/passenger-5.0.26/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:160:in `accept_and_process_next_request'
/usr/local/rvm/gems/ruby-2.2.1/gems/passenger-5.0.26/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:113:in `main_loop'
/usr/local/rvm/gems/ruby-2.2.1/gems/passenger-5.0.26/src/ruby_supportlib/phusion_passenger/request_handler.rb:416:in `block (3 levels) in start_threads'
/usr/local/rvm/gems/ruby-2.2.1/gems/passenger-5.0.26/src/ruby_supportlib/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
Completed 403 Forbidden in 4.6ms (Views: 0.2ms | ActiveRecord: 0.6ms)
1 person has
this problem
+1
Reply