Last Updated: February 25, 2016
· kennu

Failing to change user password in Rails console

When trying to change a Devise user password manually in the Rails console, if always returns false:

user = User.where(email:'').first
user.password = 'pass'
user.password_confirmation = 'pass'
=> false

The problem might be that your password is too short! :-) Check user.errors for details of the issue.