Devise 2.0 Rails 3 “NoMethodError”

I was having a problem when trying to reset my password with my rails 3.2.20 app. When I clicked the ‘reset password’ button, the following error came up:

NoMethodError in Devise::PasswordsController#create

undefined method `reset_password_sent_at=’ for #<User: class UpdateDeviseFields <

DIdn’t see anything on google, so maybe this is because I am also using the Devise Invitable gem…Whatever the case, it’s because I don’t have that field in my database.  To fix this, I had to run a migration to add this field.  I suppose it was not created in an earlier version of the gem.

  def change
    add_column :users, :reset_password_sent_at, :datetime    


  1. Kevin

    This worked like a charm for me too!!!! really not sure why this error just appeared out of the blue

    but thanks for the fix!!

Leave a Reply

Translate »