我在我的应用程序中安装Devise一切正常,但突然它开始给我这个错误没有路由匹配{:controller =>“devise / sessions”}
我的路线
resources :profiles
get "payment_notifications/create"
get "cart_items/destroy"
devise_for :users
namespace :admin do
resources :pages
resources :users
resources :books
resources :messages
resources :programs
resources :catalogs
resources :courses
resources :online_courses
resources :orders
resources :announcements
resources :guides
resources :onliners
resources :articles
get '', to: 'dashboards#index', as: '/'
match '/guides_calendar', :controller => 'guides', :action => 'calendar'
end
resources :articles
resources :payment_notifications
resources :tests
resources :carts
resources :online_courses, :path => 'cursos_en_linea' do
member do
get 'add_to_cart'
end
end
resources :cart_items
resources :pages
resources :books, :path => 'libros' do
member do
get 'add_to_cart'
end
end
resources :messages
resources :programs, :path => 'videos' do
member do
get 'add_to_cart'
end
end
resources :catalogs
match '/empresas', :controller => 'pages', :action => 'empresas'
match '/quienessomos', :controller => 'pages', :action => 'quienes_somos'
match '/privacidad', :controller => 'pages', :action => 'privacidad'
match '/comunidad', :controller => 'pages', :action => 'comunidad'
resources :courses, :path => 'cursos' do
member do
get 'add_to_cart'
end
end
root :to => 'messages#index'
application.html.erb
<% if user_signed_in? %>
<li class="login"><%= link_to('<i class="icon-shopping-cart"></i> Carrito'.html_safe, current_user.carts.last) %></li>
<li class="login"><%= link_to('<i class="icon-user"></i> Your Account'.html_safe, current_user.profile) %></li>
<li class="login"><%= link_to('Logout', destroy_user_session_path, :method => :delete) %></li>
<% else %>
<li class="login"><%= link_to("<i class='icon-user'></i> Login ".html_safe, new_user_session_path) %></li>
<% end %>
我还运行rails g devise:install和rails g devise User 我有设计:观点,但我没有改变任何东西。
有什么想法吗?
由于
答案 0 :(得分:0)
我发现错误,我认为这是一个奇怪的错误。
在我的application.html.erb中,我有:
<li><%= link_to "Servicios", :action => "index" %></li>
改为:
<li><%= link_to "Servicios" %></li>
我认为这段代码与设计控制器无关,是错误。