Note that there are some explanatory texts on larger screens.

plurals
  1. POPassword digest method functioning on localhost but not Heroku? (Hartl RubyOnRails Tutorial Chapter 7)
    primarykey
    data
    text
    <p>I've been working through Hartl's excellent RoR (3.2) tutorial (and deploying to Heroku throughout) and have become stumped why the Heroku version is no longer mirroring the behavior of the locally hosted app.</p> <p>I'm at the end of section 7.4.4: <a href="http://ruby.railstutorial.org/chapters/sign-up?version=3.2#top" rel="nofollow">http://ruby.railstutorial.org/chapters/sign-up?version=3.2#top</a></p> <p>My locally hosted app passes all tests and is able to both create a new user and give appropriate error messages when user/email/password input is incorrect or out of spec. On the Heroku deployment of the app I am getting neither success in creating a user nor correct error pages as there seems to be something wrong with the password digest function in that version. I am taken to a generic Heroku "We're sorry, but something went wrong" page.</p> <p>The "heroku logs" command gives me:</p> <p><code>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"=&gt;"✓", "authenticity_token"=&gt;"0jnDCpFnVq9fd/v1lgLNB7g0wHuXGi5bocTD3SINRzc=", "user"=&gt;{"name"=&gt;"helloq", "email"=&gt;"this@this.com", "password"=&gt;"[FILTERED]", "password_confirmation"=&gt;"[FILTERED]"}, "commit"=&gt;"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:in</code>create' 2012-04-10T19:41:17+00:00 app[web.1]: 2012-04-10T19:41:17+00:00 app[web.1]: NoMethodError (undefined method <code>password_digest=' for #&lt;User:0x0000000229e9e0&gt;): 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:in</code>new'</p> <p>Why would I get a NoMethodError when the password_digest method is functioning properly on the local deployment? I've checked with git that my local version and the remote heroku version are the same, and I've made sure to migrate the database and restart the app. </p> <p>Thanks for any suggestions!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload