frankblizzard
2011-May-14 11:30 UTC
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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
comopasta Gr
2011-May-14 11:50 UTC
Re: devise - No route matches "/sessions/user" after login.
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: 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 advanceHi, 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. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
frankblizzard
2011-May-14 12:28 UTC
Re: devise - No route matches "/sessions/user" after login.
Hey man! Thanks a bunch! After using rails destroy nifty:authentication and a generating a fresh user model... it finally WORKED! phew.. thks again On 14 Mai, 13:50, comopasta Gr <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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: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 > > 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. > > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
comopasta Gr
2011-May-14 12:49 UTC
Re: devise - No route matches "/sessions/user" after login.
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 againExcellent! Nice job :-) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.