Devise users/sign_out not working

Hi comrades,

I’m using devise sign_in and sign_up urls are workin

but, when I try the url: http://localhost:3000/users/sign_out

it generates routing error

No route matches [GET] “/users/sign_out”

How can I fix this?

Thank you,

Sayuj O.

Sayuj,

Are you using JQuery? In that case, you can try “rails g
jquery:install”. I had the same problem a few days ago. It’s an issue
related to DELETE actions.

Hi,

I too am facing the same problem.
Im not using JQuery (not that I know of, since I havent installed it)

Any suggestions to overcome this error?

For the sign_out url you should have DELETE method.
If you run ‘rake routes’ inside your project path, you could see this
route, and there is no GET /users/sign_out at all, only DELETE /users/
sign_out.
So you should use some mechanisme to make <%= link_to “Sign out”,
destroy_user_session %> = Sign out. One of the way is to use JQuery gem
and make sure you have all javascript enabled.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs