Note that there are some explanatory texts on larger screens.

plurals
  1. PONo route matches [GET] "/users/sign_out"
    text
    copied!<p>Here is my actual error: <code>No route matches [GET] "/members/sign_out"</code> Since most people will use "users" I thought it would be more helpful to have that in the title. At any rate, I am essential unable to logout. I can successfully edit my member profile.</p> <p>I am using devise 1.4.2 and Rails 3.1.0.rc4. Also, I have generated two separate devise models - one called "members" and the other called "admins". I was able to register and log into both of them (simultaneously) by manually navigating to the correct URL path (i.e., localhost:3000/admins/sign_in/). I created some links within my application.html.haml layout file by following this <a href="http://railscasts.com/episodes/209-introducing-devise" rel="noreferrer">RailsCast on Devise</a>. I am aware that it only addresses signin/signout links for "members."</p> <p>If I click on the signout link I get the above error. This occurs if I manually navigate to either signout URL (i.e., localhost:3000/admins/sign_out/).</p> <p>Can someone tell me why this is happening? Below are the various related files. And of course, I'm a newbie...</p> <p>rake routes output:</p> <pre><code> j(film_repo)$ rake routes new_member_session GET /members/sign_in(.:format) {:action=&gt;"new", :controller=&gt;"devise/sessions"} member_session POST /members/sign_in(.:format) {:action=&gt;"create", :controller=&gt;"devise/sessions"} destroy_member_session DELETE /members/sign_out(.:format) {:action=&gt;"destroy", :controller=&gt;"devise/sessions"} member_password POST /members/password(.:format) {:action=&gt;"create", :controller=&gt;"devise/passwords"} new_member_password GET /members/password/new(.:format) {:action=&gt;"new", :controller=&gt;"devise/passwords"} edit_member_password GET /members/password/edit(.:format) {:action=&gt;"edit", :controller=&gt;"devise/passwords"} PUT /members/password(.:format) {:action=&gt;"update", :controller=&gt;"devise/passwords"} cancel_member_registration GET /members/cancel(.:format) {:action=&gt;"cancel", :controller=&gt;"devise/registrations"} member_registration POST /members(.:format) {:action=&gt;"create", :controller=&gt;"devise/registrations"} new_member_registration GET /members/sign_up(.:format) {:action=&gt;"new", :controller=&gt;"devise/registrations"} edit_member_registration GET /members/edit(.:format) {:action=&gt;"edit", :controller=&gt;"devise/registrations"} PUT /members(.:format) {:action=&gt;"update", :controller=&gt;"devise/registrations"} DELETE /members(.:format) {:action=&gt;"destroy", :controller=&gt;"devise/registrations"} new_admin_session GET /admins/sign_in(.:format) {:action=&gt;"new", :controller=&gt;"devise/sessions"} admin_session POST /admins/sign_in(.:format) {:action=&gt;"create", :controller=&gt;"devise/sessions"} destroy_admin_session DELETE /admins/sign_out(.:format) {:action=&gt;"destroy", :controller=&gt;"devise/sessions"} admin_password POST /admins/password(.:format) {:action=&gt;"create", :controller=&gt;"devise/passwords"} new_admin_password GET /admins/password/new(.:format) {:action=&gt;"new", :controller=&gt;"devise/passwords"} edit_admin_password GET /admins/password/edit(.:format) {:action=&gt;"edit", :controller=&gt;"devise/passwords"} PUT /admins/password(.:format) {:action=&gt;"update", :controller=&gt;"devise/passwords"} cancel_admin_registration GET /admins/cancel(.:format) {:action=&gt;"cancel", :controller=&gt;"devise/registrations"} admin_registration POST /admins(.:format) {:action=&gt;"create", :controller=&gt;"devise/registrations"} new_admin_registration GET /admins/sign_up(.:format) {:action=&gt;"new", :controller=&gt;"devise/registrations"} edit_admin_registration GET /admins/edit(.:format) {:action=&gt;"edit", :controller=&gt;"devise/registrations"} PUT /admins(.:format) {:action=&gt;"update", :controller=&gt;"devise/registrations"} DELETE /admins(.:format) {:action=&gt;"destroy", :controller=&gt;"devise/registrations"} films GET /films(.:format) {:action=&gt;"index", :controller=&gt;"films"} POST /films(.:format) {:action=&gt;"create", :controller=&gt;"films"} new_film GET /films/new(.:format) {:action=&gt;"new", :controller=&gt;"films"} edit_film GET /films/:id/edit(.:format) {:action=&gt;"edit", :controller=&gt;"films"} film GET /films/:id(.:format) {:action=&gt;"show", :controller=&gt;"films"} PUT /films/:id(.:format) {:action=&gt;"update", :controller=&gt;"films"} DELETE /films/:id(.:format) {:action=&gt;"destroy", :controller=&gt;"films"} root / {:controller=&gt;"films", :action=&gt;"index"} </code></pre> <p>routes.rb</p> <pre><code>FilmRepo::Application.routes.draw do devise_for :members devise_for :admins resources :films root :to =&gt; 'films#index' end </code></pre> <p>admin.rb (model)</p> <pre><code>class Admin &lt; ActiveRecord::Base # Include default devise modules. Others available are: # :token_authenticatable, :encryptable, :confirmable, :lockable, and :omniauthable devise :database_authenticatable, :registerable, :timeoutable, :recoverable, :rememberable, :trackable, :validatable # Setup accessible (or protected) attributes for your model attr_accessible :email, :password, :password_confirmation, :remember_me end </code></pre> <p>member.rb (model)</p> <pre><code>class Member &lt; ActiveRecord::Base # Include default devise modules. Others available are: # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable # Setup accessible (or protected) attributes for your model attr_accessible :email, :password, :password_confirmation, :remember_me end </code></pre> <p>application.html.haml</p> <pre><code>!!! %html %head %title Film Repo = stylesheet_link_tag 'compiled/screen.css', :media =&gt; 'screen, projection' = stylesheet_link_tag 'compiled/print.css', :media =&gt; 'print' /[if lt IE 8] = stylesheet_link_tag 'compiled/ie.css', :media =&gt; 'screen, projection' = csrf_meta_tag %body.bp #container #user_nav - if member_signed_in? Signed in as #{current_member.email}. Not you? \#{link_to "Sign out", destroy_member_session_path} - else = link_to "Sign up", new_member_registration_path or #{link_to "sign in", new_member_session_path} - flash.each do |name, msg| = content_tag :div, msg, :id =&gt; "flash_#{name}" = yield </code></pre>
 

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