lundi 17 août 2015

Ruby on Rails Tutorial” by Michael Hartl Ch 10 - undefined method `rest_digest=' for #0x007f3c04f08e20>

I need some help. The problem is when I try submitting an email to reset a password, I get the following error.

NoMethodError in PasswordResetsController#create

Application trace gives the following

app/models/user.rb:57:in create_reset_digest' app/controllers/password_resets_controller.rb:8:increate'

Request

Parameters:

{"utf8"=>"✓", "authenticity_token"=>"/jhl+HQLT42IZLH2ashW6y2fpSiUY+htnOSq4oQPeUTrkHDbaj2IvLYEmt5209E7BJV07nJK/1PH+lE1CkUgUw==", "password_reset"=>"[FILTERED]", "commit"=>"Submit"}

Framework trace:

activemodel (4.2.0) lib/active_model/attribute_methods.rb:433:in method_missing' activerecord (4.2.0) lib/active_record/persistence.rb:238:inupdate_attribute' actionpack (4.2.0) lib/action_controller/metal/implicit_render.rb:4:in send_action' actionpack (4.2.0) lib/abstract_controller/base.rb:198:inprocess_action' actionpack (4.2.0) lib/action_controller/metal/rendering.rb:10:in process_action' actionpack (4.2.0) lib/abstract_controller/callbacks.rb:20:inblock in process_action' activesupport (4.2.0) lib/active_support/callbacks.rb:117:in call' activesupport (4.2.0) lib/active_support/callbacks.rb:117:incall' activesupport (4.2.0) lib/active_support/callbacks.rb:234:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:234:incall' activesupport (4.2.0) lib/active_support/callbacks.rb:234:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:169:incall' activesupport (4.2.0) lib/active_support/callbacks.rb:169:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:169:incall' activesupport (4.2.0) lib/active_support/callbacks.rb:169:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:169:incall' activesupport (4.2.0) lib/active_support/callbacks.rb:169:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:92:incall' activesupport (4.2.0) lib/active_support/callbacks.rb:92:in _run_callbacks' activesupport (4.2.0) lib/active_support/callbacks.rb:734:in_run_process_action_callbacks' activesupport (4.2.0) lib/active_support/callbacks.rb:81:in run_callbacks' actionpack (4.2.0) lib/abstract_controller/callbacks.rb:19:inprocess_action' actionpack (4.2.0) lib/action_controller/metal/rescue.rb:29:in process_action' actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:31:inblock in process_action' activesupport (4.2.0) lib/active_support/notifications.rb:164:in block in instrument' activesupport (4.2.0) lib/active_support/notifications/instrumenter.rb:20:ininstrument' activesupport (4.2.0) lib/active_support/notifications.rb:164:in instrument' actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:30:inprocess_action' actionpack (4.2.0) lib/action_controller/metal/params_wrapper.rb:250:in process_action' activerecord (4.2.0) lib/active_record/railties/controller_runtime.rb:18:inprocess_action' actionpack (4.2.0) lib/abstract_controller/base.rb:137:in process' actionview (4.2.0) lib/action_view/rendering.rb:30:inprocess' actionpack (4.2.0) lib/action_controller/metal.rb:195:in dispatch' actionpack (4.2.0) lib/action_controller/metal/rack_delegation.rb:13:indispatch' actionpack (4.2.0) lib/action_controller/metal.rb:236:in block in action' actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:73:incall' actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:73:in dispatch' actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:42:inserve' actionpack (4.2.0) lib/action_dispatch/journey/router.rb:43:in block in serve' actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:ineach' actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in serve' actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:802:incall' rack (1.6.1) lib/rack/etag.rb:24:in call' rack (1.6.1) lib/rack/conditionalget.rb:38:incall' rack (1.6.1) lib/rack/head.rb:13:in call' actionpack (4.2.0) lib/action_dispatch/middleware/params_parser.rb:27:incall' actionpack (4.2.0) lib/action_dispatch/middleware/flash.rb:260:in call' rack (1.6.1) lib/rack/session/abstract/id.rb:225:incontext' rack (1.6.1) lib/rack/session/abstract/id.rb:220:in call' actionpack (4.2.0) lib/action_dispatch/middleware/cookies.rb:560:incall' activerecord (4.2.0) lib/active_record/query_cache.rb:36:in call' activerecord (4.2.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:647:incall' activerecord (4.2.0) lib/active_record/migration.rb:378:in call' actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:29:inblock in call' activesupport (4.2.0) lib/active_support/callbacks.rb:88:in call' activesupport (4.2.0) lib/active_support/callbacks.rb:88:in_run_callbacks' activesupport (4.2.0) lib/active_support/callbacks.rb:734:in _run_call_callbacks' activesupport (4.2.0) lib/active_support/callbacks.rb:81:inrun_callbacks' actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:27:in call' actionpack (4.2.0) lib/action_dispatch/middleware/reloader.rb:73:incall' actionpack (4.2.0) lib/action_dispatch/middleware/remote_ip.rb:78:in call' web-console (2.0.0.beta3) lib/action_dispatch/debug_exceptions.rb:18:inmiddleware_call' web-console (2.0.0.beta3) lib/action_dispatch/debug_exceptions.rb:13:in call' actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:incall' railties (4.2.0) lib/rails/rack/logger.rb:38:in call_app' railties (4.2.0) lib/rails/rack/logger.rb:20:inblock in call' activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in block in tagged' activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:intagged' activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in tagged' railties (4.2.0) lib/rails/rack/logger.rb:20:incall' actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in call' rack (1.6.1) lib/rack/methodoverride.rb:22:incall' rack (1.6.1) lib/rack/runtime.rb:18:in call' activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:incall' rack (1.6.1) lib/rack/lock.rb:17:in call' actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:incall' rack (1.6.1) lib/rack/sendfile.rb:113:in call' railties (4.2.0) lib/rails/engine.rb:518:incall' railties (4.2.0) lib/rails/application.rb:164:in call' rack (1.6.1) lib/rack/lock.rb:17:incall' rack (1.6.1) lib/rack/content_length.rb:15:in call' rack (1.6.1) lib/rack/handler/webrick.rb:89:inservice' /usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:138:in service' /usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:94:inrun' /usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'

Full Trace

app/models/user.rb:57:in create_reset_digest' app/controllers/password_resets_controller.rb:8:increate' activemodel (4.2.0) lib/active_model/attribute_methods.rb:433:in method_missing' activerecord (4.2.0) lib/active_record/persistence.rb:238:inupdate_attribute' actionpack (4.2.0) lib/action_controller/metal/implicit_render.rb:4:in send_action' actionpack (4.2.0) lib/abstract_controller/base.rb:198:inprocess_action' actionpack (4.2.0) lib/action_controller/metal/rendering.rb:10:in process_action' actionpack (4.2.0) lib/abstract_controller/callbacks.rb:20:inblock in process_action' activesupport (4.2.0) lib/active_support/callbacks.rb:117:in call' activesupport (4.2.0) lib/active_support/callbacks.rb:117:incall' activesupport (4.2.0) lib/active_support/callbacks.rb:234:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:234:incall' activesupport (4.2.0) lib/active_support/callbacks.rb:234:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:169:incall' activesupport (4.2.0) lib/active_support/callbacks.rb:169:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:169:incall' activesupport (4.2.0) lib/active_support/callbacks.rb:169:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:169:incall' activesupport (4.2.0) lib/active_support/callbacks.rb:169:in block in halting' activesupport (4.2.0) lib/active_support/callbacks.rb:92:incall' activesupport (4.2.0) lib/active_support/callbacks.rb:92:in _run_callbacks' activesupport (4.2.0) lib/active_support/callbacks.rb:734:in_run_process_action_callbacks' activesupport (4.2.0) lib/active_support/callbacks.rb:81:in run_callbacks' actionpack (4.2.0) lib/abstract_controller/callbacks.rb:19:inprocess_action' actionpack (4.2.0) lib/action_controller/metal/rescue.rb:29:in process_action' actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:31:inblock in process_action' activesupport (4.2.0) lib/active_support/notifications.rb:164:in block in instrument' activesupport (4.2.0) lib/active_support/notifications/instrumenter.rb:20:ininstrument' activesupport (4.2.0) lib/active_support/notifications.rb:164:in instrument' actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:30:inprocess_action' actionpack (4.2.0) lib/action_controller/metal/params_wrapper.rb:250:in process_action' activerecord (4.2.0) lib/active_record/railties/controller_runtime.rb:18:inprocess_action' actionpack (4.2.0) lib/abstract_controller/base.rb:137:in process' actionview (4.2.0) lib/action_view/rendering.rb:30:inprocess' actionpack (4.2.0) lib/action_controller/metal.rb:195:in dispatch' actionpack (4.2.0) lib/action_controller/metal/rack_delegation.rb:13:indispatch' actionpack (4.2.0) lib/action_controller/metal.rb:236:in block in action' actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:73:incall' actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:73:in dispatch' actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:42:inserve' actionpack (4.2.0) lib/action_dispatch/journey/router.rb:43:in block in serve' actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:ineach' actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in serve' actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:802:incall' rack (1.6.1) lib/rack/etag.rb:24:in call' rack (1.6.1) lib/rack/conditionalget.rb:38:incall' rack (1.6.1) lib/rack/head.rb:13:in call' actionpack (4.2.0) lib/action_dispatch/middleware/params_parser.rb:27:incall' actionpack (4.2.0) lib/action_dispatch/middleware/flash.rb:260:in call' rack (1.6.1) lib/rack/session/abstract/id.rb:225:incontext' rack (1.6.1) lib/rack/session/abstract/id.rb:220:in call' actionpack (4.2.0) lib/action_dispatch/middleware/cookies.rb:560:incall' activerecord (4.2.0) lib/active_record/query_cache.rb:36:in call' activerecord (4.2.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:647:incall' activerecord (4.2.0) lib/active_record/migration.rb:378:in call' actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:29:inblock in call' activesupport (4.2.0) lib/active_support/callbacks.rb:88:in call' activesupport (4.2.0) lib/active_support/callbacks.rb:88:in_run_callbacks' activesupport (4.2.0) lib/active_support/callbacks.rb:734:in _run_call_callbacks' activesupport (4.2.0) lib/active_support/callbacks.rb:81:inrun_callbacks' actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:27:in call' actionpack (4.2.0) lib/action_dispatch/middleware/reloader.rb:73:incall' actionpack (4.2.0) lib/action_dispatch/middleware/remote_ip.rb:78:in call' web-console (2.0.0.beta3) lib/action_dispatch/debug_exceptions.rb:18:inmiddleware_call' web-console (2.0.0.beta3) lib/action_dispatch/debug_exceptions.rb:13:in call' actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:incall' railties (4.2.0) lib/rails/rack/logger.rb:38:in call_app' railties (4.2.0) lib/rails/rack/logger.rb:20:inblock in call' activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in block in tagged' activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:intagged' activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in tagged' railties (4.2.0) lib/rails/rack/logger.rb:20:incall' actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in call' rack (1.6.1) lib/rack/methodoverride.rb:22:incall' rack (1.6.1) lib/rack/runtime.rb:18:in call' activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:incall' rack (1.6.1) lib/rack/lock.rb:17:in call' actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:incall' rack (1.6.1) lib/rack/sendfile.rb:113:in call' railties (4.2.0) lib/rails/engine.rb:518:incall' railties (4.2.0) lib/rails/application.rb:164:in call' rack (1.6.1) lib/rack/lock.rb:17:incall' rack (1.6.1) lib/rack/content_length.rb:15:in call' rack (1.6.1) lib/rack/handler/webrick.rb:89:inservice' /usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:138:in service' /usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:94:inrun' /usr/local/rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'

Aucun commentaire:

Enregistrer un commentaire