Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6889991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:13:32+00:00 2026-05-27T06:13:32+00:00

rake routes: new_user_session GET /users/sign_in(.:format) {:action=>new, :controller=>devise/sessions} user_session POST /users/sign_in(.:format) {:action=>create, :controller=>devise/sessions} destroy_user_session DELETE

  • 0

rake routes:

        new_user_session GET    /users/sign_in(.:format)          {:action=>"new", :controller=>"devise/sessions"}
            user_session POST   /users/sign_in(.:format)          {:action=>"create", :controller=>"devise/sessions"}
    destroy_user_session DELETE /users/sign_out(.:format)         {:action=>"destroy", :controller=>"devise/sessions"}
           user_password POST   /users/password(.:format)         {:action=>"create", :controller=>"devise/passwords"}
       new_user_password GET    /users/password/new(.:format)     {:action=>"new", :controller=>"devise/passwords"}
      edit_user_password GET    /users/password/edit(.:format)    {:action=>"edit", :controller=>"devise/passwords"}
                         PUT    /user  devise_for :userss/password(.:format)         {:action=>"update", :controller=>"devise/passwords"}
cancel_user_registration GET    /users/cancel(.:format)           {:action=>"cancel", :controller=>"devise/registrations"}
       user_registration POST   /users(.:format)                  {:action=>"create", :controller=>"devise/registrations"}
   new_user_registration GET    /users/sign_up(.:format)          {:action=>"new", :controller=>"devise/registrations"}
  edit_user_registration GET    /users/edit(.:format)             {:action=>"edit", :controller=>"devise/registrations"}
                         PUT    /users(.:format)                  {:action=>"update", :controller=>"devise/registrations"}
                         DELETE /users(.:format)                  {:action=>"destroy", :controller=>"devise/registrations"}
       user_confirmation POST   /users/confirmation(.:format)     {:action=>"create", :controller=>"devise/confirmations"}
   new_user_confirmation GET    /users/confirmation/new(.:format) {:action=>"new", :controller=>"devise/confirmations"}
                         GET    /users/confirmation(.:format)     {:action=>"show", :controller=>"devise/confirmations"}
              home_index GET    /home/index(.:format)             {:controller=>"home", :action=>"index"}
                    root        /                                 {:controller=>"home", :action=>"index"}

But if I click the logout link , I get

Routing Error

No route matches [GET] "/users/sign_out"

This is the application.html.erb:

<!DOCTYPE html>
<html>  devise_for :users
<head>
  <title>Rorblog</title>
  <%= stylesheet_link_tag    "application" %>
  <%#= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>
<body>
<div id="container">

    <div id="header">

        <ul class="hmenu">
            <li>
                <%= link_to('Home', home_index_path ) %>
            </li>
            <% if user_signed_in? %>
              <li>
                <%= link_to('Logout', destroy_user_session_path, :method => :delete) %>
              </li>

              <li>
                <%= link_to('Edit registration', edit_user_registration_path) %>
              </li>

            <% else %>
              <li>
                <%= link_to('Login', new_user_session_path)  %>
              </li>
            <% end %>
        </ul>
        <p class="notice"><%= notice %></p>
        <p class="alert"><%= alert %></p>       
    </div>

    <div id="content">
        <div id="loadwhat">
            <%= yield %>
        </div>
    </div>

    <div id="footer">
        <%= "user1@copyright.com" %>
    </div>
</div>

</body>
</html>

From page source I got:

<a href="/users/sign_out" data-method="delete" rel="nofollow">Logout</a>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:13:33+00:00Added an answer on May 27, 2026 at 6:13 am

    The “rake routes” task shows the HTTP method that it will respond to in the second column. In the case of destroy_user_session_path, it only responds to the DELETE HTTP method. This is for safety as this is a destructive action, and different than a GET request. Ideally, web crawlers will not follow DELETE links because of their potential destructiveness.

    As Arun Kumar Arjunan states, you will need to explicitly specify that this link should be executed with a DELETE method. By placing “:method => :delete” in your link, Rails UJS will convert this link to DELETE instead of a GET request, and follow the redirection from the server.

    More information on HTTP methods here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

    And more information on Rails UJS here: https://github.com/rails/jquery-ujs/wiki/Unobtrusive-scripting-support-for-jQuery

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

from rake routes I get this in my application new_admin_session GET /admins/sign_in(.:format) {:controller=>devise/sessions, :action=>new}
rails 3.1 rake routes for admin/sections_contoller trigger_admin_section GET /admin/sections/:id/trigger(.:format) {:action=>trigger, :controller=>admin/sections} admin_sections GET /admin/sections(.:format)
when I do rails g model user name:string rails g controller users index create
I add this line in my routes.rb file map.connect ':controller/:action/:id/:title', :controller => recipes thinking
routes.rb => Sendemail::Application.routes.draw do devise_for :users get user/index get home/index root :to => 'home#index'
According to rake routes, there's the same path for getting an index of objects
When I run rake gems:build with hpricot 0.6.164 on my FreeBSD server I get:
I'm using rake to create a Table of contents from a bunch of static
In rails, on can show the active routes with rake ( http://guides.rubyonrails.org/routing.html ): $
I have namespace in my routes.rb namespace :businesses do resources :registration end My controller

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.