{"comment":{"created_at":"2011-10-13T14:27:05Z","body":"Monkey patch for anyone experiencing the same issue: https://github.com/digitalfrost/devise_cancan_debug/blob/72175aff9c851118eb2b6bd122b81e643e0a889a/config/application.rb\r\n(lines 42-47)\r\n","updated_at":"2011-10-13T14:27:05Z","url":"https://api.github.com/repos/plataformatec/devise/issues/comments/2395274","id":2395274,"user":{"gravatar_id":"56226256bbec9e47b5948e0d72322127","avatar_url":"https://secure.gravatar.com/avatar/56226256bbec9e47b5948e0d72322127?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/digitalfrost","id":286763,"login":"digitalfrost"}},"action":"created","issue":{"number":1379,"created_at":"2011-10-12T09:56:19Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Adding the cancan gem to a Rails 3 App Gemfile breaks Devise's \"send password reset instructions\" and produces the following error\r\n\r\n```\r\nNoMethodError: undefined method `new_session_path' for #<Devise::PasswordsController:0x00000003b1b5b8>\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/devise-1.4.8/app/controllers/devise/passwords_controller.rb:48:in `after_sending_reset_password_instructions_path_for'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/devise-1.4.8/app/controllers/devise/passwords_controller.rb:17:in `create'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.10/lib/action_controller/metal/implicit_render.rb:4:in `send_action'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.10/lib/abstract_controller/base.rb:150:in `process_action'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.10/lib/action_controller/metal/rendering.rb:11:in `process_action'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.10/lib/abstract_controller/callbacks.rb:18:in `block in process_action'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:446:in `_run__1739912974408911624__process_action__2985759677419550871__callbacks'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:410:in `_run_process_action_callbacks'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:94:in `run_callbacks'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.10/lib/abstract_controller/callbacks.rb:17:in `process_action'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.10/lib/action_controller/metal/rescue.rb:17:in `process_action'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.10/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/notifications.rb:52:in `block in instrument'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/notifications/instrumenter.rb:21:in `instrument'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/notifications.rb:52:in `instrument'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.10/lib/action_controller/metal/instrumentation.rb:29:in `process_action'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.10/lib/abstract_controller/base.rb:119:in `process'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.10/lib/abstract_controller/rendering.rb:41:in `process'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.10/lib/action_controller/metal/testing.rb:12:in `process_with_new_base_test'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.10/lib/action_controller/test_case.rb:412:in `process'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.10/lib/action_controller/test_case.rb:47:in `process'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/devise-1.4.8/lib/devise/test_helpers.rb:19:in `block in process'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/devise-1.4.8/lib/devise/test_helpers.rb:70:in `catch'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/devise-1.4.8/lib/devise/test_helpers.rb:70:in `_catch_warden'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/devise-1.4.8/lib/devise/test_helpers.rb:19:in `process'\r\n    /home/gerald/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.10/lib/action_controller/test_case.rb:355:in `post'\r\n    /home/gerald/devise_cancan_debug/test/functional/passwords_controller_test.rb:13:in `block in <class:PasswordsControllerTest>'\r\n\r\n```\r\n\r\nI've forked the devise example app: https://github.com/digitalfrost/devise_cancan_debug\r\nand added a functional test for \"request password reset\" to demonstrate the problem.","comments":1,"title":"Cancan gem breaks \"send password reset instructions\"","updated_at":"2011-10-13T14:27:05Z","url":"https://api.github.com/repos/plataformatec/devise/issues/1379","id":1885908,"assignee":null,"milestone":null,"closed_at":null,"user":{"gravatar_id":"56226256bbec9e47b5948e0d72322127","avatar_url":"https://secure.gravatar.com/avatar/56226256bbec9e47b5948e0d72322127?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/digitalfrost","id":286763,"login":"digitalfrost"},"html_url":"https://github.com/plataformatec/devise/issues/1379","labels":[],"state":"open"},"legacy":{"issue_id":1885908,"comment_id":2395274}}