devise - No route matches "/sessions/user" after login...

it is the first time I am working with devise and I am a confused by the massive amount of files and configuration options. Before installing devise, I used the nifty:authentication from ryan bates - which I didn't delete before installing devise and I guess now my routes and/or controllers are a little screwed up.

well, after singing in on /users/sign_in devise tries to redirect me to

http://localhost:3000/sessions/user

but I get the error:

No route matches "/sessions/user"

I don't know where is the error, any help appreciated

I put all the relevant code in a gist: https://gist.github.com/972058

I am pretty sure it has something to do with the app/views/devise/ session/new.html.erb file, where it says: "<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| ....

cause if I change the session_path(ressource_name) the redirect works but devise doesn't log me in..

help!

thanks in advance

Thomas M. wrote in post #998672:

it is the first time I am working with devise and I am a confused by the massive amount of files and configuration options. Before installing devise, I used the nifty:authentication from ryan bates - which I didn't delete before installing devise and I guess now my routes and/or controllers are a little screwed up.

well, after singing in on /users/sign_in devise tries to redirect me to

http://localhost:3000/sessions/user

but I get the error:

No route matches "/sessions/user"

I don't know where is the error, any help appreciated

I put all the relevant code in a gist: devise routing error ยท GitHub

I am pretty sure it has something to do with the app/views/devise/ session/new.html.erb file, where it says: "<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| ....

cause if I change the session_path(ressource_name) the redirect works but devise doesn't log me in..

help!

thanks in advance

Hi, in my opinion you should remove completely the functionality from nifty:authentication since most probably it is messing up completely the app.

I use devise and don't need worry about sessions controller or user controller and model methods unless I need to add some specific stuff on top of what devise already gives. Don't even need to have sessions on the routes and all that. It comes with Devise.

I would recommend creating a basic app using devise so you can see what Devise really needs to operate and then set it in your app. But keeping it with the other authentication mechanism might bring lots of hidden issues...

Cheers.

Hey man! Thanks a bunch! After using rails destroy nifty:authentication and a generating a fresh user model... it finally WORKED! phew.. thks again

Thomas M. wrote in post #998683:

Hey man! Thanks a bunch! After using rails destroy nifty:authentication and a generating a fresh user model... it finally WORKED! phew.. thks again

Excellent! Nice job :slight_smile: