我正在尝试使用Rails 4制作应用程序。
我正在(拼命)设置设计(我一直在尝试,过去3年没有成功)。
我的应用程序在heroku上。
当我登录时,我尝试按下退出按钮。我收到一条错误消息,告诉我检查日志。
日志输出为:
2016-01-02T00:52:17.660202+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/devise-3.4.1/lib/devise/controllers/sign_in_out.rb:57:in `sign_out'
2016-01-02T00:52:17.660208+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:505:in `call'
2016-01-02T00:52:17.660195+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/devise-3.4.1/lib/devise/controllers/rememberable.rb:23:in `forget_me'
2016-01-02T00:52:17.660201+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/devise-3.4.1/lib/devise/controllers/sign_in_out.rb:75:in `sign_out_all_scopes'
2016-01-02T00:52:17.660208+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:505:in `call'
2016-01-02T00:52:17.660198+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/warden-1.2.3/lib/warden/hooks.rb:9:in `_run_callbacks'
2016-01-02T00:52:17.660205+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_controller/metal/rendering.rb:10:in `process_action'
2016-01-02T00:52:17.660200+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/warden-1.2.3/lib/warden/proxy.rb:262:in `block in logout'
2016-01-02T00:52:17.660206+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:117:in `call'
2016-01-02T00:52:17.660201+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/warden-1.2.3/lib/warden/proxy.rb:260:in `logout'
2016-01-02T00:52:17.660207+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
2016-01-02T00:52:17.660199+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/warden-1.2.3/lib/warden/manager.rb:53:in `_run_callbacks'
2016-01-02T00:52:17.660205+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
2016-01-02T00:52:17.660198+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/warden-1.2.3/lib/warden/hooks.rb:9:in `each'
2016-01-02T00:52:17.660204+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/abstract_controller/base.rb:198:in `process_action'
2016-01-02T00:52:17.660210+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:81:in `run_callbacks'
2016-01-02T00:52:17.660165+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
2016-01-02T00:52:17.660196+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/warden-1.2.3/lib/warden/hooks.rb:14:in `call'
2016-01-02T00:52:17.660203+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/devise-3.4.1/app/controllers/devise/sessions_controller.rb:25:in `destroy'
2016-01-02T00:52:17.660209+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
2016-01-02T00:52:17.660174+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.4/lib/active_record/transactions.rb:285:in `save'
2016-01-02T00:52:17.660200+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/warden-1.2.3/lib/warden/proxy.rb:260:in `each'
2016-01-02T00:52:17.660207+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:117:in `call'
2016-01-02T00:52:17.660167+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.4/lib/active_record/transactions.rb:220:in `transaction'
2016-01-02T00:52:17.660197+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/warden-1.2.3/lib/warden/hooks.rb:14:in `block in _run_callbacks'
2016-01-02T00:52:17.660203+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
2016-01-02T00:52:17.660210+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
2016-01-02T00:52:17.660215+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
2016-01-02T00:52:17.660214+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/notifications.rb:164:in `instrument'
2016-01-02T00:52:17.660224+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
2016-01-02T00:52:17.660211+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/abstract_controller/callbacks.rb:19:in `process_action'
2016-01-02T00:52:17.660218+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/abstract_controller/base.rb:137:in `process'
2016-01-02T00:52:17.660212+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
2016-01-02T00:52:17.660214+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2016-01-02T00:52:17.660224+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_controller/metal.rb:237:in `block in action'
2016-01-02T00:52:17.660212+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_controller/metal/rescue.rb:29:in `process_action'
2016-01-02T00:52:17.660217+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.4/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
2016-01-02T00:52:17.660225+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:76:in `dispatch'
2016-01-02T00:52:17.660216+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
2016-01-02T00:52:17.660225+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:76:in `call'
2016-01-02T00:52:17.660213+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/notifications.rb:164:in `block in instrument'
2016-01-02T00:52:17.660223+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_controller/metal.rb:196:in `dispatch'
2016-01-02T00:52:17.660227+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/routing/mapper.rb:49:in `serve'
2016-01-02T00:52:17.660219+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionview-4.2.4/lib/action_view/rendering.rb:30:in `process'
2016-01-02T00:52:17.660228+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/journey/router.rb:30:in `serve'
2016-01-02T00:52:17.660216+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/searchkick-1.1.2/lib/searchkick/logging.rb:108:in `process_action'
2016-01-02T00:52:17.660227+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/journey/router.rb:43:in `block in serve'
2016-01-02T00:52:17.660226+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:45:in `serve'
2016-01-02T00:52:17.660228+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/journey/router.rb:30:in `each'
2016-01-02T00:52:17.660232+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'
2016-01-02T00:52:17.660229+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:821:in `call'
2016-01-02T00:52:17.660231+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'
2016-01-02T00:52:17.660230+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'
2016-01-02T00:52:17.660235+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'
2016-01-02T00:52:17.660234+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'
2016-01-02T00:52:17.660235+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
2016-01-02T00:52:17.660230+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'
2016-01-02T00:52:17.660239+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
2016-01-02T00:52:17.660232+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!'
2016-01-02T00:52:17.660241+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/flash.rb:260:in `call'
2016-01-02T00:52:17.660233+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call'
2016-01-02T00:52:17.660241+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'
2016-01-02T00:52:17.660242+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/cookies.rb:560:in `call'
2016-01-02T00:52:17.660239+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
2016-01-02T00:52:17.660244+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
2016-01-02T00:52:17.660242+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'
2016-01-02T00:52:17.660236+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'
2016-01-02T00:52:17.660243+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
2016-01-02T00:52:17.660237+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call'
2016-01-02T00:52:17.660244+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2016-01-02T00:52:17.660238+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/conditionalget.rb:38:in `call'
2016-01-02T00:52:17.660244+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
2016-01-02T00:52:17.660237+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
2016-01-02T00:52:17.660242+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.4/lib/active_record/query_cache.rb:36:in `call'
2016-01-02T00:52:17.660247+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/rack/logger.rb:38:in `call_app'
2016-01-02T00:52:17.660246+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2016-01-02T00:52:17.660253+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
2016-01-02T00:52:17.660251+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:68:in `tagged'
2016-01-02T00:52:17.660259+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:518:in `call'
2016-01-02T00:52:17.660246+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2016-01-02T00:52:17.660252+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
2016-01-02T00:52:17.660250+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2016-01-02T00:52:17.660258+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
2016-01-02T00:52:17.660250+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/rack/logger.rb:20:in `block in call'
2016-01-02T00:52:17.660257+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
2016-01-02T00:52:17.660251+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:26:in `tagged'
2016-01-02T00:52:17.660259+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:165:in `call'
2016-01-02T00:52:17.660245+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:81:in `run_callbacks'
2016-01-02T00:52:17.660252+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/rack/logger.rb:20:in `call'
2016-01-02T00:52:17.660260+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call'
2016-01-02T00:52:17.660245+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2016-01-02T00:52:17.660262+00:00 app[web.1]: vendor/ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
2016-01-02T00:52:17.660246+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
2016-01-02T00:52:17.660252+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2016-01-02T00:52:17.660260+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call'
2016-01-02T00:52:17.660258+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/static.rb:116:in `call'
2016-01-02T00:52:17.660263+00:00 app[web.1]:
2016-01-02T00:52:17.660261+00:00 app[web.1]: vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'
2016-01-02T00:52:17.660263+00:00 app[web.1]:
2016-01-02T00:52:17.660261+00:00 app[web.1]: vendor/ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
2016-01-02T00:52:17.660262+00:00 app[web.1]: vendor/ruby-2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
我不明白这个消息的一个词。任何人都可以破译它的含义吗?
我的路线是:
devise_for :users, #class_name: 'FormUser',
:controllers => {
:registrations => "users/registrations",
# :omniauth_callbacks => "users/authentications"
:omniauth_callbacks => 'users/omniauth_callbacks'
}
# get '/auth/:provider/callback' => 'users/authentications#create'
# get '/authentications/sign_out', :to => 'users/authentications#destroy'
# PER SOURCEY TUTORIAL ----------
match '/users/:id/finish_signup' => 'users#finish_signup', via: [:get, :patch], :as => :finish_signup
我没有在路线中定义的特定登出路径。我正在关注的源代码教程没有使用一个,我明白这是设计宝石功能的一部分。
我的佣金路线显示:
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
导航栏的注销链接为:
<%= link_to "Sign out", destroy_user_session_path, :method => :delete %>