Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7411933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:27:47+00:00 2026-05-29T06:27:47+00:00

I recently added devise confirmable module to my rails app. My application runs well

  • 0

I recently added devise confirmable module to my rails app. My application runs well in dev. But, when I push it to heroku, it says “We’re sorry, but something went wrong.”. Following is my heroku log-

Rendered devise/confirmations/new.html.erb within layouts/application (2.7ms)
2012-02-03T01:55:07+00:00 app[web.1]: Rendered devise/shared/_links.erb (0.5ms)
2012-02-03T01:55:07+00:00 app[web.1]: cache: [GET /users/confirmation/new] miss
2012-02-03T01:55:07+00:00 app[web.1]: Completed 200 OK in 19ms (Views: 16.9ms | ActiveRecord: 0.0ms)
2012-02-03T01:55:07+00:00 heroku[router]: GET personaldiary.herokuapp.com/users/confirmation/new dyno=web.1 queue=0 wait=0ms service=42ms status=200 bytes=1540
2012-02-03T01:55:11+00:00 app[web.1]: 
2012-02-03T01:55:11+00:00 app[web.1]: 
2012-02-03T01:55:11+00:00 app[web.1]: Started POST "/users/confirmation" for 50.131.164.83 at 2012-02-03 01:55:11 +0000
2012-02-03T01:55:11+00:00 app[web.1]:   Parameters: {"utf8"=>"✓", "authenticity_token"=>"iVVTpWgIrBTR8b9k07lr2tYDFQfAYD0R8JmGVkmfzl4=", "user"=>{"email"=>"hrishikeshp19@gmail.com"}, "commit"=>"Resend confirmation instructions"}
2012-02-03T01:55:11+00:00 app[web.1]:   Processing by Devise::ConfirmationsController#create as HTML
2012-02-03T01:55:11+00:00 app[web.1]: Completed 500 Internal Server Error in 4ms
2012-02-03T01:55:11+00:00 app[web.1]: 
2012-02-03T01:55:11+00:00 app[web.1]: NameError (undefined local variable or method `confirmed_at' for #<User:0x000000023254e0>):
2012-02-03T01:55:11+00:00 app[web.1]:   
2012-02-03T01:55:11+00:00 app[web.1]: cache: [POST /users/confirmation] invalidate, pass
2012-02-03T01:55:11+00:00 app[web.1]: 

It is clear that the database does not have “confirmed_at” column. My migration file is as follows:

class AddConfirmableToDeviseV1 < ActiveRecord::Migration
  def up
   add_column :users, :confirmation_token, :string
   add_column :users, :confirmed_at, :datetime
   add_column :users, :confirmation_sent_at , :datetime

   add_index  :users, :confirmation_token, :unique => true
  end

  def down
    remove_index  :users, :confirmation_token

    remove_column :users, :confirmation_sent_at
    remove_column :users, :confirmed_at
    remove_column :users, :confirmation_token
  end
end

My production is hosted on heroku:

So I ran

heroku run rake db:migrate

It gave me no output.

Then I ran

heroku run rake db:rollback

It gave me

==  AddConfirmableToDeviseV1: reverting =======================================
-- remove_index(:users, :confirmation_token)
rake aborted!
An error has occurred, this and all later migrations canceled:

Index name 'index_users_on_confirmation_token' on table 'users' does not exist

Tasks: TOP => db:rollback

Also,

heroku run rake db:migrate --trace

gives me following

** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment 
** Invoke db:load_config 
** Execute db:schema:dump

Any Ideas how to solve this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:27:47+00:00Added an answer on May 29, 2026 at 6:27 am

    Problem solved.

    I deleted my migration files. Added a new migration file with devise helper in migration change method.

    class AddConfirmableToDevise < ActiveRecord::Migration
        def change
            change_table(:users) do |t|
                t.confirmable
            end
            add_index :users, :confirmation_token,   :unique => true
        end
    end
    

    Ran the migration again with

    heroku run rake db:migrate
    

    And whoa…it worked. I do not know how does this make sense, but I am glad that it worked. Please leave comments, I am keen to read explanation.

    Anyway, thanks everybody.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've recently just added Devise to my first Rails3 app, and I'm having a
I recently added a feature to a large application written in Delphi (version 2009)
I recently added CKEditor to my app and I would like to include my
I've recently added landscape autorotation to my iPhone navigation based application, however I'm having
I recently added a :title column using Rails migration: class AddTitleToMicroposts < ActiveRecord::Migration def
I've recently added ActiveScaffold to an existing Rails project, and the problem I'm having
I have recently added OpenID login to my website. But I don't know how
I am having an issue with my application. I recently added ScrollView as the
I recently started back up with Rails and things are going well up until
I recently added Struts 1.3 to my application on Tomcat. Here are my observations,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.