Last Updated: February 25, 2016
·
5.106K
· kennu

Failing to change user password in Rails console

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

user = User.where(email:'me@example.com').first
user.password = 'pass'
user.password_confirmation = 'pass'
user.save
=> false

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