Ruby on rails 使用路线约束时设计错误

Ruby on rails 使用路线约束时设计错误,ruby-on-rails,ruby-on-rails-4,devise,rails-routing,Ruby On Rails,Ruby On Rails 4,Devise,Rails Routing,我正在使用Desive进行身份验证。我在约束中有一条路由 当这个路径被击中时,我得到一个错误,Desive的变量未定义 routes.rb Rails.application.routes.draw do constraints subdomain: 'www' do root to: "splash#index" end devise_for :users, controllers: { registrations: 'registrations', sessions:

我正在使用Desive进行身份验证。我在
约束中有一条路由

当这个路径被击中时,我得到一个错误,Desive的变量未定义

routes.rb

Rails.application.routes.draw do
  constraints subdomain: 'www' do
    root to: "splash#index"
  end

  devise_for :users, controllers: { registrations: 'registrations', sessions: 'sessions' }

  # More routes are here...

end
错误:

undefined local variable or method `destroy_user_session_path' for #<#<Class:0x007fbd23022208>:0x007fbd35769c98>
未定义的局部变量或方法“销毁用户会话路径”#

此错误发生在Desive的任何URL路径上。如何修复此问题?

尝试查看
rake routes
为您提供了什么。
路由问题的答案几乎总是在那里。

您能显示覆盖会话控制器的代码吗?您能显示
rake routes
的输出吗?你打电话到哪里去了?
destroy\u user\u session\u path
?你点击了什么url…请分享?我遇到了完全相同的问题,我不知道发生了什么