Note that there are some explanatory texts on larger screens.

plurals
  1. PORails 3.1 - Devise - CanCan: "../users/sign_out" gets routing error "uninitialized constant UsersController"
    text
    copied!<p>"sign_in" works fine but clicking on "sign_out" link locks up during routing (see routes.rb below).</p> <p>Not sure where to proceed. I'm using RubyMine (IDE) debugger. I click on a link from layout/applications.html.erb:</p> <pre><code> &lt;%= link_to('Logout', destroy_user_session_path) %&gt; </code></pre> <p>RM Debugger watchlist shows: destroy_user_session_path="/user/sign_out"</p> <p>When I sign_in as a user I breakpoint in "../devise/sessions_controller.rb#sign_in" and that all works fine when I continue.</p> <p>The status change gives me a "sign_out" link in my applications.html layout but when I click there I get above routine error. I don't get breakpoints in "../application_controller.rb" or "../devise/sessions_controller.rb#sign_out"</p> <h2>Here is routes.rb</h2> <pre><code>Demo::Application.routes.draw do # replace devise_for :users with: devise_for :users, :controllers =&gt; { :registrations =&gt; "devise/registrations" } get "user/show" get "user/edit" get "user/index" get "user/create" get "user/update" get "user/new" resources :users resources :orders resources :carts resources :line_items resource :store do member do get "store/index" end end match ':controller(/:action(/:id(.:format)))' root to: 'store#index' end </code></pre> <hr> <p>And rake:routes</p> <pre><code> new_user_session GET /users/sign_in(.:format) {:action=&gt;"new", :controller=&gt;"devise/sessions"} user_session POST /users/sign_in(.:format) {:action=&gt;"create", :controller=&gt;"devise/sessions"} destroy_user_session DELETE /users/sign_out(.:format) {:action=&gt;"destroy", :controller=&gt;"devise/sessions"} cancel_user_registration GET /users/cancel(.:format) {:action=&gt;"cancel", :controller=&gt;"devise/registrations"} user_registration POST /users(.:format) {:action=&gt;"create", :controller=&gt;"devise/registrations"} new_user_registration GET /users/sign_up(.:format) {:action=&gt;"new", :controller=&gt;"devise/registrations"} edit_user_registration GET /users/edit(.:format) {:action=&gt;"edit", :controller=&gt;"devise/registrations"} PUT /users(.:format) {:action=&gt;"update", :controller=&gt;"devise/registrations"} DELETE /users(.:format) {:action=&gt;"destroy", :controller=&gt;"devise/registrations"} user_show GET /user/show(.:format) {:controller=&gt;"user", :action=&gt;"show"} user_edit GET /user/edit(.:format) {:controller=&gt;"user", :action=&gt;"edit"} user_index GET /user/index(.:format) {:controller=&gt;"user", :action=&gt;"index"} user_create GET /user/create(.:format) {:controller=&gt;"user", :action=&gt;"create"} user_update GET /user/update(.:format) {:controller=&gt;"user", :action=&gt;"update"} user_new GET /user/new(.:format) {:controller=&gt;"user", :action=&gt;"new"} users GET /users(.:format) {:action=&gt;"index", :controller=&gt;"users"} POST /users(.:format) {:action=&gt;"create", :controller=&gt;"users"} new_user GET /users/new(.:format) {:action=&gt;"new", :controller=&gt;"users"} edit_user GET /users/:id/edit(.:format) {:action=&gt;"edit", :controller=&gt;"users"} user GET /users/:id(.:format) {:action=&gt;"show", :controller=&gt;"users"} PUT /users/:id(.:format) {:action=&gt;"update", :controller=&gt;"users"} DELETE /users/:id(.:format) {:action=&gt;"destroy", :controller=&gt;"users"} orders GET /orders(.:format) {:action=&gt;"index", :controller=&gt;"orders"} POST /orders(.:format) {:action=&gt;"create", :controller=&gt;"orders"} new_order GET /orders/new(.:format) {:action=&gt;"new", :controller=&gt;"orders"} edit_order GET /orders/:id/edit(.:format) {:action=&gt;"edit", :controller=&gt;"orders"} order GET /orders/:id(.:format) {:action=&gt;"show", :controller=&gt;"orders"} PUT /orders/:id(.:format) {:action=&gt;"update", :controller=&gt;"orders"} DELETE /orders/:id(.:format) {:action=&gt;"destroy", :controller=&gt;"orders"} carts GET /carts(.:format) {:action=&gt;"index", :controller=&gt;"carts"} POST /carts(.:format) {:action=&gt;"create", :controller=&gt;"carts"} new_cart GET /carts/new(.:format) {:action=&gt;"new", :controller=&gt;"carts"} edit_cart GET /carts/:id/edit(.:format) {:action=&gt;"edit", :controller=&gt;"carts"} cart GET /carts/:id(.:format) {:action=&gt;"show", :controller=&gt;"carts"} PUT /carts/:id(.:format) {:action=&gt;"update", :controller=&gt;"carts"} DELETE /carts/:id(.:format) {:action=&gt;"destroy", :controller=&gt;"carts"} line_items GET /line_items(.:format) {:action=&gt;"index", :controller=&gt;"line_items"} POST /line_items(.:format) {:action=&gt;"create", :controller=&gt;"line_items"} new_line_item GET /line_items/new(.:format) {:action=&gt;"new", :controller=&gt;"line_items"} edit_line_item GET /line_items/:id/edit(.:format) {:action=&gt;"edit", :controller=&gt;"line_items"} line_item GET /line_items/:id(.:format) {:action=&gt;"show", :controller=&gt;"line_items"} PUT /line_items/:id(.:format) {:action=&gt;"update", :controller=&gt;"line_items"} DELETE /line_items/:id(.:format) {:action=&gt;"destroy", :controller=&gt;"line_items"} store_index_store GET /store/store/index(.:format) {:controller=&gt;"store/store", :action=&gt;"index"} store POST /store(.:format) {:action=&gt;"create", :controller=&gt;"stores"} new_store GET /store/new(.:format) {:action=&gt;"new", :controller=&gt;"stores"} edit_store GET /store/edit(.:format) {:action=&gt;"edit", :controller=&gt;"stores"} GET /store(.:format) {:action=&gt;"show", :controller=&gt;"stores"} PUT /store(.:format) {:action=&gt;"update", :controller=&gt;"stores"} DELETE /store(.:format) {:action=&gt;"destroy", :controller=&gt;"stores"} /:controller(/:action(/:id(.:format))) root / {:controller=&gt;"store", :action=&gt;"index"} </code></pre> <p>Robin</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload