我的導軌應用程序崩潰了,幾分鐘前它工作正常。現在它給了我路由錯誤。導軌路由錯誤(定義路由)
我routes.rb
文件看起來像這樣:
get "public_pages/home", :as => "home"
get "log_in" => "sessions#new", :as => "log_in"
get "log_out" => "sessions#destroy", :as => "log_out"
get "sign_up" => "users#new", :as => "sign_up"
match "session" => "sessions#create", :via =>:post
root :to => "public_pages#home"
resources :users, :except => [:index,
:new,
:destroy]
resources :sessions
resources :questions
我得到的錯誤是:No route matches {:action=>"show", :controller=>"users"}
當我去localhost:3000/sign_up
在此先感謝。
您的路線看起來不錯,假設它們實際上是按照您展示的順序指定的。你有沒有嘗試重新啓動服務器? – ajselvig 2013-05-02 03:57:20
是的,我試過重新啓動服務器,但那並沒有解決問題。 – lcheung90 2013-05-02 06:00:26