我正在使用设计来管理我的 rails 应用程序中的用户帐户。它在我的开发环境中运行良好。我刚刚推送到 Heroku,当我导航到 /users/sign_up 页面(用户/sign_in 正在工作)时,我得到“您正在寻找的页面不存在”。我检查了日志并得到:
ActionController::RoutingError (No route matches [GET] "/users/sign_up")
我的 routes.rb 是:
get "home/index"
get "deals/new"
get "deals/all"
resources :deals
devise_for :users
root :to => "home#index"
知道出了什么问题吗?
谢谢
更新:
路线是:
home_index GET /home/index(.:format) home#index
deals_new GET /deals/new(.:format) deals#new
deals_all GET /deals/all(.:format) deals#all
deals GET /deals(.:format) deals#index
POST /deals(.:format) deals#create
new_deal GET /deals/new(.:format) deals#new
edit_deal GET /deals/:id/edit(.:format) deals#edit
deal GET /deals/:id(.:format) deals#show
PUT /deals/:id(.:format) deals#update
DELETE /deals/:id(.:format) deals#destroy
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
root / home#index
更新:
我在 heroku 上 rake 路线,结果非常不同。
home_index GET /home/index(.:format) home#index
deals_new GET /deals/new(.:format) deals#new
deals_all GET /deals/all(.:format) deals#all
deals GET /deals(.:format) deals#index
POST /deals(.:format) deals#create
new_deal GET /deals/new(.:format) deals#new
edit_deal GET /deals/:id/edit(.:format) deals#edit
deal GET /deals/:id(.:format) deals#show
PUT /deals/:id(.:format) deals#update
DELETE /deals/:id(.:format) deals#destroy
root / home#index
似乎没有设置设计。我究竟做错了什么?