Devise password reset from Rails console
# $ rails console production
u=User.where(:email => '[email protected]').first
u.password='userpassword'
u.password_confirmation='userpassword'
u.save!
Modern devise allows simpler syntax, no need to set the confirmation field
user.password = new_password; user.save
# or
user.update(password: new_password)