我向我的应用程序中的表添加了一个新的迁移,然后我进行了迁移。由于它有错误,我删除并迁移了它。当我注册一个用户并尝试使用电子邮件(设计,可确认)确认它时,它只是不会确认。它说无效的确认令牌。我已经尝试重新启动服务器。据我所知,再次删除和迁移,一切皆有可能。我正在使用 Rails 3.2.9 和 Ruby 1.9.3。设计版本为 3.1.0。Devise 也包含在我添加的其他 gem 中,例如 rails-messaging 和 active-admin。
Started POST "/users/confirmation" for 127.0.0.1 at 2013-09-16 19:42:47 +0530
Processing by Devise::ConfirmationsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"4lMxdlsMqRCJB1doxt/hTCQhUPvAoGPiSbr9wQA/ZAQ=", "user"=>{"email"=>"pro.aravind@gmail.com"}, "commit"=>"Resend confirmation instructions"}
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."unconfirmed_email" = 'pro.aravind@gmail.com' LIMIT 1
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'pro.aravind@gmail.com' LIMIT 1
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."confirmation_token" = 'cc47150f51ec476aa40ea1d546e27c0dafc37ffc8bb82272a9f2377c863daed1' LIMIT 1
(0.1ms) begin transaction
(0.3ms) UPDATE "users" SET "confirmation_token"='cc47150f51ec476aa40ea1d546e27c0dafc37ffc8bb82272a9f2377c863daed1', "confirmation_sent_at" = '2013-09-16 14:12:47.174313', "updated_at" = '2013-09-16 14:12:47.175384' WHERE "users"."id" = 1
(175.3ms) commit transaction
Rendered devise/mailer/confirmation_instructions.html.erb (0.6ms)
Sent mail to pro.aravind@gmail.com (5099ms)
Date: Mon, 16 Sep 2013 19:42:47 +0530
From: please-change-me-at-config-initializers-devise@example.com
Reply-To: please-change-me-at-config-initializers-devise@example.com
To: pro.aravind@gmail.com
Message-ID: <523711df6bb56_3a029657f88282b@aravind-VPCEB46FGB.mail>
Subject: Confirmation instructions
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<p>Welcome pro.aravind@gmail.com!</p>
<p>You can confirm your account email through the link below:</p>
<p><a href="http://localhost:3000/users/confirmation?confirmation_token=cc47150f51ec476aa40ea1d546e27c0dafc37ffc8bb82272a9f2377c863daed1">Confirm my account</a></p>
Redirected to http://localhost:3000/users/sign_in
Completed 302 Found in 5387ms (ActiveRecord: 0.0ms)