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

  • SEARCH
  • Home
  • 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 7875577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:00:22+00:00 2026-06-03T03:00:22+00:00

I have devise and users controller routes.rb devise_for :users resources :users do resources :blogs

  • 0

I have devise and users controller

routes.rb

  devise_for :users
  
  resources :users do
    resources :blogs
  end

users_controller.rb

class UsersController < ApplicationController
  respond_to :html, :xml, :json

  def create
    @user = User.create(params[:user])
  end

  def show
    @user = User.find(params[:id])
    @asset = Asset.find(params[:id])
    respond_with [@user, @asset]
  end

  def update
    @user = User.find(params[:id])
    @user.update_attributes(params[:user])
    respond_with @user
  end
end

when I visit http://localhost:3000/users/sign_out

I get

ActiveRecord::RecordNotFound in UsersController#show

Couldn't find User with id=sign_out

update:

                   users GET    /users(.:format)                                   users#index
                         POST   /users(.:format)                                   users#create
                new_user GET    /users/new(.:format)                               users#new
               edit_user GET    /users/:id/edit(.:format)                          users#edit
                    user GET    /users/:id(.:format)                               users#show
                         PUT    /users/:id(.:format)                               users#update
                         DELETE /users/:id(.:format)                               users#destroy
        new_user_session GET    /users/sign_in(.:format)                           devise/sessions#new
            user_session POST   /users/sign_in(.:format)                           devise/sessions#create
    destroy_user_session DELETE /users/sign_out(.:format)                          devise/sessions#destroy
           user_password POST   /users/password(.:format)                          devise/passwords#create
       new_user_password GET    /users/password/new(.:format)                      devise/passwords#new
      edit_user_password GET    /users/password/edit(.:format)                     devise/passwords#edit
                         PUT    /users/password(.:format)                          devise/passwords#update
cancel_user_registration GET    /users/cancel(.:format)                            devise/registrations#cancel
       user_registration POST   /users(.:format)                                   devise/registrations#create
   new_user_registration GET    /users/sign_up(.:format)                           devise/registrations#new
  edit_user_registration GET    /users/edit(.:format)                              devise/registrations#edit
                         PUT    /users(.:format)                                   devise/registrations#update
                         DELETE /users(.:format)                                   devise/registrations#destroy

Any solution?

  • 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-06-03T03:00:23+00:00Added an answer on June 3, 2026 at 3:00 am

    It happens because your session is destroyed by DELETE method.

    From your rake routes:

    destroy_user_session DELETE /users/sign_out(.:format)                        devise/sessions#destroy
    

    And when you visit http://localhost:3000/users/sign_out, you use GET

    You can change method in initializers/devise.rb. Just set config.sign_out_via to :get

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

Sidebar

Related Questions

I have namespace in my routes.rb namespace :businesses do resources :registration end My controller
My routes devise_for :users devise_for :admin_users, ActiveAdmin::Devise.config #I have also tried removing this for
I have the following routes in my 3.1.0.rc5 app # config/routes.rb devise_for :users resources
I have this in routes.rb: devise_for :users, :controllers => { :omniauth_callbacks => users/omniauth_callbacks }
I have this in routes.rb root :to => posts#index devise_for :users, :controllers => {
How would you stub Devise in Rails 3 with rSpec. I have a UsersController
I have a Rails 3.1.3 app which uses devise for users authentication and soft-deletes
I have a class User in Rails using Mongoid and Devise. I can't seem
I'm trying to override a Devise controller to have some minor changes, for example
I create controller with InherritedResource class AppsController < InheritedResources::Base belongs_to :company # Devise before_filter

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.