Upgrade Redmine to 1.4.4 can't login: "undefined method `authenticate' " for nil:NilClass):
Added by Ruslan Fad about 12 years ago
Processing AccountController#login (for *********** at 2012-07-06 17:06:39) [POST] Parameters: {"password"=>"[FILTERED]", "back_url"=>"http%3A%2F%2F********.ru%2F", "controller"=>"account", "authenticity_token"=>"************************/2CoPfIB5Yw=", "username"=>"***", "action"=>"login", "login"=>"*************"} NoMethodError (undefined method `authenticate' for nil:NilClass): app/models/user.rb:245:in `check_password?' app/models/user.rb:147:in `try_to_login' app/controllers/account_controller.rb:143:in `password_authentication' app/controllers/account_controller.rb:138:in `authenticate_user' app/controllers/account_controller.rb:30:in `login' passenger (2.2.15) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
Can't login after upgrade. Any help?
PS: Clean install worked fine...
Replies (8)
RE: Upgrade Redmine to 1.4.4 can't login: "undefined method `authenticate' " for nil:NilClass):
-
Added by William Roush about 12 years ago
Is this using a database to authenticate or LDAP?
It seems like the user has an auth_source_id that isn't valid, or is failing to load... did you run the database upgrade migration from RedmineUpgrade?
rake db:migrate RAILS_ENV=production
RE: Upgrade Redmine to 1.4.4 can't login: "undefined method `authenticate' " for nil:NilClass):
-
Added by Ruslan Fad about 12 years ago
database/
Yes, a run this, no errors.
RE: Upgrade Redmine to 1.4.4 can't login: "undefined method `authenticate' " for nil:NilClass):
-
Added by William Roush about 12 years ago
Ruslan Fad wrote:
database/
Yes, a run this, no errors.
Odd, what is auth_source_id for the user account in the database? It should be null.
What version did you upgrade from?
RE: Upgrade Redmine to 1.4.4 can't login: "undefined method `authenticate' " for nil:NilClass):
-
Added by Ruslan Fad about 12 years ago
Yea, it's be a 0, not NULL.
I set it to NULL (sqlupdate), but..
An other error:
Processing WelcomeController#index (for 95.141.232.148 at 2012-07-06 19:07:31) [GET] Parameters: {"controller"=>"welcome", "action"=>"index"} NoMethodError (undefined method `session_lifetime?' for #<Class:0xb5bf6908>): app/controllers/application_controller.rb:86:in `session_expired?' app/controllers/application_controller.rb:75:in `session_expiration' passenger (2.2.15) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request' passenger (2.2.15) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop' passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:441:in `start_request_handler' passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:381:in `handle_spawn_application' passenger (2.2.15) lib/phusion_passenger/utils.rb:252:in `safe_fork'
RE: Upgrade Redmine to 1.4.4 can't login: "undefined method `authenticate' " for nil:NilClass):
-
Added by Ruslan Fad about 12 years ago
Oh, i found
Manually adding the missing var's in ./config/settings.yml
Solved
Thanks!
RE: Upgrade Redmine to 1.4.4 can't login: "undefined method `authenticate' " for nil:NilClass):
-
Added by William Roush about 12 years ago
Ruslan Fad wrote:
Oh, i found
Manually adding the missing var's in ./config/settings.yml
SolvedThanks!
Ah good catch, I was a bit confused on that one. :)
Guess it was an old version you were upgrading from.
RE: Upgrade Redmine to 1.4.4 can't login: "undefined method `authenticate' " for nil:NilClass):
-
Added by mat taylor about 12 years ago
I am also getting an NoMethodError (undefined method `session_lifetime?'
What missing vars did you add to settings to fix this?
Thanks,
mat
RE: Upgrade Redmine to 1.4.4 can't login: "undefined method `authenticate' " for nil:NilClass):
-
Added by Ruslan Fad about 12 years ago
compare old and new config
in old this is missing
# Maximum lifetime of user sessions in minutes session_lifetime: format: int default: 0