0

I have this route file

 Qitch::Application.routes.draw do

     devise_for :users, :controllers => {
      :omniauth_callbacks => "users/omniauth_callbacks",
      :registrations => "users/registrations",
      :sessions => "users/sessions",
     :passwords => "users/passwords"
    }

   devise_for :users
    as :user do
    get '/sign_up', :to => "users/registrations#new"
    get "sign_out", :to => "users/sessions#destroy"
   end

  root :to => 'welcome#index'  
 end

when i click on this link in application layout

     <a href="/users/sign_up">Sign-up Now, It's fast and free</a>

i have this error

  Routing Error

  No route matches {:controller=>"users/welcome"}

  Try running rake routes for more information on available routes. 

I don't understand why this occur

Any help

Thanks

Kashiftufail
  • 10,815
  • 11
  • 45
  • 79

1 Answers1

1

1.) as the Routing Error promts, try to run rake routes which will show you all defined routes, from the output you can see if you defined something not as wanted

2.) as stated in devise custom routes try something like:

get "/sign_up" => "devise/registrations#new"

3.) use the paths in your view: generating paths and urls from code

<%= link_to "Login", signup_user_path %>
Community
  • 1
  • 1
jethroo
  • 2,086
  • 2
  • 18
  • 30