That is because you have forgotten to uncomment t.confirmable in
initial devise migartion, in that case the
confirmable model does not know confirmed_at attribute and the
following method in device/model/confirmable.rb raises error.
# Generates a new random token for confirmation, and stores
the time
# this token is being generated
def generate_confirmation_token
self.confirmed_at = nil
self.confirmation_token = self.class.confirmation_token
self.confirmation_sent_at = Time.now.utc
end
Check your db/shema.rb to see if there is a confirmed_at field or not.
To solve this, you can re-create your devise model with correct
migration (as you did) or create another migration to modify current
devise model:
rails g migration addconfirmable
then change the migration file as follows: (account is my devise model
in this case, use yours instead)
def self.up
change_table(:accounts) do |t|
t.confirmable
end
end
rake db:migrate
It should work now.
Regards
-Reza