Password digest method works on localhost, but not Heroku? (Hartl RubyOnRails Tutorial, Chapter 7)

I was working on the Hartl RoR (3.2) tutorial (and deployed to Heroku everywhere) and became very concerned about why the Heroku version no longer reflects the behavior of a locally hosted application.

I am at the end of section 7.4.4: http://ruby.railstutorial.org/chapters/sign-up?version=3.2#top

My locally hosted application passes all the tests and can either create a new user or give corresponding error messages when the user login / email address / password is incorrect or missing. In the deployment of the Heroku application, I get neither success, nor user creation, nor the correct error pages, because there seems to be something wrong with the password digest feature in this version. I ended up in general Heroku "We're sorry, but something went wrong."

The "heroku logs" command gives me:

Started POST "/users" for 97.81.107.108 at 2012-04-10 19:41:17 +0000 2012-04-10T19:41:17+00:00 app[web.1]: Processing by UsersController#create as HTML 2012-04-10T19:41:17+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"0jnDCpFnVq9fd/v1lgLNB7g0wHuXGi5bocTD3SINRzc=", "user"=>{"name"=>"helloq", "email"=>"this@this.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Create my account"} 2012-04-10T19:41:17+00:00 app[web.1]: 2012-04-10T19:41:17+00:00 app[web.1]: app/controllers/users_controller.rb:12:increate "2012-04-10T19: 41:17 + 00: 00 application [web.1]: 2012-04-10T19: 41:17 + 00: 00 application [web.1]: NoMethodError (undefined method password_digest=' for #<User:0x0000000229e9e0>): 2012-04-10T19:41:17+00:00 app[web.1]: 2012-04-10T19:41:17+00:00 heroku[router]: POST simple-sword-1851.herokuapp.com/users dyno=web.1 queue=0 wait=0ms service=128ms status=500 bytes=643 2012-04-10T19:41:17+00:00 app[web.1]: Completed 500 Internal Server Error in 104ms 2012-04-10T19:41:17+00:00 app[web.1]: app/controllers/users_controller.rb:12:innew '

NoMethodError, password_digest ? git, heroku , .

!

+3
1

. . 7, , reset Heroku. , :

heroku pg:reset SHARED_DATABASE --confirm simple-sword-1851
heroku run rake db:migrate

, - .

+2

All Articles