Rails devise help routing error No route matches “/sessions/user”?

You don't have a root_url defined. It is still pointing to the static public/index.html. (edited out by Ryan Bigg) devise_for :users is stated twice resources :users is unnecessary unless you have a RESTful controller handling destroy and index actions outside of devise Do you, in fact, have a "users" controller for that first edit action too?

That should probably be in a custom Users::RegistrationsController.

You don't have a root_url defined. It is still pointing to the static public/index.html. (edited out by Ryan Bigg) devise_for :users is stated twice.

Resources :users is unnecessary unless you have a RESTful controller handling destroy and index actions outside of devise. Do you, in fact, have a "users" controller for that first edit action too? That should probably be in a custom Users::RegistrationsController.

You don't have a root_url defined. It is still pointing to the static public/index.html. (edited out by Ryan Bigg).

Up vote 2 down vote favorite share g+ share fb share tw.

When I login on my page I automatic go to the route: http://localhost:3000/sessions/user And I get this error: Routing Error No route matches "/sessions/user" I have created a controller named sessions_controller. Rb in users folder here it is: class Users::SessionsController "You have been logged out. " end def create user = User.

Authenticate(params:login, params:encrypted_password) if user session:user_id = user. Id redirect_to root_url, :notice => "Logged in successfully. " else flash.

Now:alert = "Invalid login or password. " render :action => 'new' end end def destroy session:user_id = nil redirect_to root_url, :notice => "You have been logged out. " end end My route file: Densidste::Application.routes.

Draw do match 'user/edit' => 'users#edit', :as => :edit_current_user devise_for :users, :controllers => { :sessions => "users/sessions" } do get "login", :to => "devise/sessions#new" get "opret", :to => 'users/users#new' get "logud", :to => 'users/users#destroy' end resources :sessions resources :users devise_for :users, :controllers => { :sessions => "users/sessions" } resources :aktivs resources :taggingposts resources :tags resources :kommentares resources :posts end ruby-on-rails ruby ruby-on-rails-3 authentication devise link|improve this question edited May 10 '11 at 21:36Ryan Bigg30.1k33164 asked May 10 '11 at 21:09Hans135.

– Ryan Bigg May 10 '11 at 21:36 I am expecting that my session controller works and redirects to the root url with the notice "Succesfully loged in" – Hans May 10 '11 at 21:43.

For those who experiencing this issue with Devise 2.0 and Rails 3.2.1 and checked all the observations made by @Micah Alcorn but still facing the problem — restart your web server. Worked for me.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions