未修改的Devise布尔值没有方法错误

时间:2013-05-30 20:36:49

标签: ruby-on-rails ruby-on-rails-3 devise

我正在开发一个传统的RoR应用程序,我正在配置设备(作为Restful_authentication插件的替代品)。我遇到了一个非常奇怪的错误。当我尝试转到/users/sign_in页面时,我得到了这个

NoMethodError in Devise::SessionsController#new

undefined method `is_navigational_format?' for #<Devise::SessionsController:0x000000034b2078>

我唯一一次看到引用此错误的时候是有人试图用自己的方式覆盖设计会话控制器。 (https://groups.google.com/d/msg/plataformatec-devise/jyYNhaRztDU/MLsjwxRvf_YJ)我没有试过这样做。

我已经正确安装了设备(跟随他们的wiki)。我已将devise_for :users添加到我的路线中。我已经多次重启服务器了。如果还有其他信息或文件,我很乐意提供。

在rails控制台中运行$LOAD_PATH.dup时编辑包含的输出

"/usr/local/rvm/gems/ruby-1.9.3-p429/gems/devise-2.2.4/lib", "/usr/local/rvm/gems/ruby-1.9.3-p429/gems/devise-2.2.4/app/controllers", "/usr/local/rvm/gems/ruby-1.9.3-p429/gems/devise-2.2.4/app/helpers", "/usr/local/rvm/gems/ruby-1.9.3-p429/gems/devise-2.2.4/app/mailers" 

我正在使用Rails 3.2.13,ruby 1.9.3和设计2.2.4 这是全栈跟踪

  

设计(2.2.4)app / controllers / devise_controller.rb:119:在require_no_authentication' activesupport (3.2.13) lib/active_support/callbacks.rb:418:in 运行 _1218703357271506681__process_action_ 3906451143611010656 _callbacks'   activesupport(3.2.13)lib / active_support / callbacks.rb:405:in __run_callback' activesupport (3.2.13) lib/active_support/callbacks.rb:385:in _ run_process_action_callbacks'   activesupport(3.2.13)lib / active_support / callbacks.rb:81:in run_callbacks' actionpack (3.2.13) lib/abstract_controller/callbacks.rb:17:in process_action'   actionpack(3.2.13)lib / action_controller / metal / rescue.rb:29:在process_action中的process_action' actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:30:in块中   activesupport(3.2.13)lib / active_support / notifications.rb:123:in block in instrument' activesupport (3.2.13) lib/active_support/notifications/instrumenter.rb:20:in instrument'   activesupport(3.2.13)lib / active_support / notifications.rb:123:in instrument' actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:29:in process_action'   actionpack(3.2.13)lib / action_controller / metal / params_wrapper.rb:207:in process_action' actionpack (3.2.13) lib/abstract_controller/base.rb:121:in process'   actionpack(3.2.13)lib / abstract_controller / rendering.rb:45:in process' actionpack (3.2.13) lib/action_controller/metal.rb:203:in dispatch'   actionpack(3.2.13)lib / action_controller / metal / rack_delegation.rb:14:in dispatch' actionpack (3.2.13) lib/action_controller/metal.rb:246:in block in action'   actionpack(3.2.13)lib / action_dispatch / routing / route_set.rb:73:in call' actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:73:in dispatch'   actionpack(3.2.13)lib / action_dispatch / routing / route_set.rb:36:in call' actionpack (3.2.13) lib/action_dispatch/routing/mapper.rb:42:in call'   旅程(1.0.4)lib / journey / router.rb:68:in block in call' journey (1.0.4) lib/journey/router.rb:56:in each'   旅程(1.0.4)lib / journey / router.rb:56:in call' actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:612:in call'   warden(1.2.1)lib / warden / manager.rb:35:in block in call' warden (1.2.1) lib/warden/manager.rb:34:in catch'   arden(1.2.1)lib / warden / manager.rb:34:in call' actionpack (3.2.13) lib/action_dispatch/middleware/best_standards_support.rb:17:in call'   rack(1.4.5)lib / rack / etag.rb:23:in call' rack (1.4.5) lib/rack/conditionalget.rb:25:in call'   actionpack(3.2.13)lib / action_dispatch / middleware / head.rb:14:in call' actionpack (3.2.13) lib/action_dispatch/middleware/params_parser.rb:21:in call'   actionpack(3.2.13)lib / action_dispatch / middleware / flash.rb:242:in call' rack (1.4.5) lib/rack/session/abstract/id.rb:210:in context'   rack(1.4.5)lib / rack / session / abstract / id.rb:205:in call' actionpack (3.2.13) lib/action_dispatch/middleware/cookies.rb:341:in call'   activerecord(3.2.13)lib / active_record / query_cache.rb:64:in call' activerecord (3.2.13) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in call'   actionpack(3.2.13)lib / action_dispatch / middleware / callbacks.rb:28:in block in call' activesupport (3.2.13) lib/active_support/callbacks.rb:405:in 运行 _3871622813520347987_ 调用 _3063468228496691759__callbacks'   activesupport(3.2.13)lib / active_support / callbacks.rb:405:in __run_callback' activesupport (3.2.13) lib/active_support/callbacks.rb:385:in _ run_call_callbacks'   activesupport(3.2.13)lib / active_support / callbacks.rb:81:in run_callbacks' actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:27:in call'   actionpack(3.2.13)lib / action_dispatch / middleware / reloader.rb:65:in call' actionpack (3.2.13) lib/action_dispatch/middleware/remote_ip.rb:31:in call'   actionpack(3.2.13)lib / action_dispatch / middleware / debug_exceptions.rb:16:in call' actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:in call'   railties(3.2.13)lib / rails / rack / logger.rb:32:in call_app' railties (3.2.13) lib/rails/rack/logger.rb:16:in阻止呼叫'   activesupport(3.2.13)lib / active_support / tagged_logging.rb:22:in tagged' railties (3.2.13) lib/rails/rack/logger.rb:16:in call'   actionpack(3.2.13)lib / action_dispatch / middleware / request_id.rb:22:in call' rack (1.4.5) lib/rack/methodoverride.rb:21:in call'   rack(1.4.5)lib / rack / runtime.rb:17:in call' activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:in call'   rack(1.4.5)lib / rack / lock.rb:15:in call' actionpack (3.2.13) lib/action_dispatch/middleware/static.rb:63:in call'   railties(3.2.13)lib / rails / engine.rb:479:in call' railties (3.2.13) lib/rails/application.rb:223:in call'   railties(3.2.13)lib / rails / railtie / configurable.rb:30:in method_missing' passenger (4.0.2) lib/phusion_passenger/rack/thread_handler_extension.rb:77:in process_request'   passenger(4.0.2)lib / phusion_passenger / request_handler / thread_handler.rb:135:in accept_and_process_next_request' passenger (4.0.2) lib/phusion_passenger/request_handler/thread_handler.rb:106:in main_loop'   passenger(4.0.2)lib / phusion_passenger / request_handler.rb:449:in block (4 levels) in start_threads' passenger (4.0.2) lib/phusion_passenger/utils/robust_interruption.rb:108:in disable_interruptions'   passenger(4.0.2)lib / phusion_passenger / request_handler.rb:444:在start_threads'中的'block(3个级别)

0 个答案:

没有答案