سؤال

I'm developing a rails 4 site locally and it works fine. I'd been deploying it to heroku to test with remote users, and until recently that was ok too-- but I added carrierwave to the system, and now when I push to heroku I'm getting the following error in my logs, with a fatal error when a user tries to log in:

2014-03-27T03:10:01.435066+00:00 app[web.1]:   Parameters: {"utf8"=>"✓", "authenticity_token"=>"sh+leChGzXYSVinF4TNyvsIKZ35nCGYouooOsXz53Go=", "session"=>{"email"=>"user@email.com", "password"=>"[FILTERED]"}, "commit"=>"Sign in"}
2014-03-27T03:10:01.432869+00:00 app[web.1]: Started POST "/sessions" for 24.160.59.49 at 2014-03-27 03:10:01 +0000
2014-03-27T03:10:01.546330+00:00 app[web.1]: Completed 500 Internal Server Error in 111ms
2014-03-27T03:10:01.546330+00:00 app[web.1]: Completed 500 Internal Server Error in 111ms
2014-03-27T03:10:01.547713+00:00 app[web.1]:   app/helpers/sessions_helper.rb:5:in `sign_in'
2014-03-27T03:10:01.547713+00:00 app[web.1]: 
2014-03-27T03:10:01.547713+00:00 app[web.1]:   app/controllers/sessions_controller.rb:9:in `create'
2014-03-27T03:10:01.547713+00:00 app[web.1]: 
2014-03-27T03:10:01.547713+00:00 app[web.1]: 
2014-03-27T03:10:01.547713+00:00 app[web.1]: NoMethodError (undefined method `avatar_changed?' for #<User:0x007f80285546f0>):
2014-03-27T03:10:01.547713+00:00 app[web.1]: 
2014-03-27T03:10:01.547898+00:00 app[web.1]: 
2014-03-27T03:10:01.547713+00:00 app[web.1]:   app/helpers/sessions_helper.rb:5:in `sign_in'
2014-03-27T03:10:01.548616+00:00 heroku[router]: at=info method=POST path=/sessions host=myappname.herokuapp.com request_id=edc5598c-0aad-4599-ae59-663014d3d63f fwd="24.160.59.49" dyno=web.1 connect=2ms service=129ms status=500 bytes=1543
2014-03-27T03:10:01.547713+00:00 app[web.1]:   app/controllers/sessions_controller.rb:9:in `create'
2014-03-27T03:10:01.547713+00:00 app[web.1]: NoMethodError (undefined method `avatar_changed?' for #<User:0x007f80285546f0>):

Any ideas? I'm dead in the water until I can figure this out!

هل كانت مفيدة؟

المحلول

Turns out that Heroku was using a different version of the carrierwave gem than I had in my local gemfile. Once I got that sorted out, things appear to be working as expected.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top