3
我有鐵軌Rails 2.3.8和Devise 1.0.8。我也跟着installation instructions,但在嘗試訪問/用戶/ sign_in當第一次修改後的routes.rb,我得到設計Ruby on Rails,安裝後的路由問題
Internal Server Error
undefined method `[]' for :users:Symbol
當我重裝,我得到
Routing Error
No route matches "https://stackoverflow.com/users/sign_up" with {:method=>:get}
如果把map.devise_for :users
在其他map.
之上,當嘗試訪問例如/藝術家或/歌曲時,我會遇到同樣的路由錯誤。
我錯過了什麼嗎?
更新:這裏是rake routes
new_user_session GET /users/sign_in {:controller=>"sessions", :action=>"new"}
user_session POST /users/sign_in {:controller=>"sessions", :action=>"create"}
destroy_user_session GET /users/sign_out {:controller=>"sessions", :action=>"destroy"}
new_user_password GET /users/password/new(.:format) {:controller=>"passwords", :action=>"new"}
edit_user_password GET /users/password/edit(.:format) {:controller=>"passwords", :action=>"edit"}
user_password PUT /users/password(.:format) {:controller=>"passwords", :action=>"update"}
POST /users/password(.:format) {:controller=>"passwords", :action=>"create"}
new_user_registration GET /users/sign_up(.:format) {:controller=>"registrations", :action=>"new"}
edit_user_registration GET /users/edit(.:format) {:controller=>"registrations", :action=>"edit"}
user_registration PUT /users(.:format) {:controller=>"registrations", :action=>"update"}
DELETE /users(.:format) {:controller=>"registrations", :action=>"destroy"}
POST /users(.:format) {:controller=>"registrations", :action=>"create"}
songs GET /songs(.:format) {:controller=>"songs", :action=>"index"}
POST /songs(.:format) {:controller=>"songs", :action=>"create"}
new_song GET /songs/new(.:format) {:controller=>"songs", :action=>"new"}
edit_song GET /songs/:id/edit(.:format) {:controller=>"songs", :action=>"edit"}
song GET /songs/:id(.:format) {:controller=>"songs", :action=>"show"}
PUT /songs/:id(.:format) {:controller=>"songs", :action=>"update"}
DELETE /songs/:id(.:format) {:controller=>"songs", :action=>"destroy"}
artist_songs GET /artists/:artist_id/songs(.:format) {:controller=>"songs", :action=>"index"}
POST /artists/:artist_id/songs(.:format) {:controller=>"songs", :action=>"create"}
new_artist_song GET /artists/:artist_id/songs/new(.:format) {:controller=>"songs", :action=>"new"}
edit_artist_song GET /artists/:artist_id/songs/:id/edit(.:format) {:controller=>"songs", :action=>"edit"}
artist_song GET /artists/:artist_id/songs/:id(.:format) {:controller=>"songs", :action=>"show"}
PUT /artists/:artist_id/songs/:id(.:format) {:controller=>"songs", :action=>"update"}
DELETE /artists/:artist_id/songs/:id(.:format) {:controller=>"songs", :action=>"destroy"}
artists GET /artists(.:format) {:controller=>"artists", :action=>"index"}
POST /artists(.:format) {:controller=>"artists", :action=>"create"}
new_artist GET /artists/new(.:format) {:controller=>"artists", :action=>"new"}
edit_artist GET /artists/:id/edit(.:format) {:controller=>"artists", :action=>"edit"}
artist GET /artists/:id(.:format) {:controller=>"artists", :action=>"show"}
PUT /artists/:id(.:format) {:controller=>"artists", :action=>"update"}
DELETE /artists/:id(.:format) {:controller=>"artists", :action=>"destroy"}
root / {:controller=>"home", :action=>"index"}
/:controller/:action/:id
/:controller/:action/:id(.:format)
運行'rake routes'會得到什麼結果? – 2010-08-03 11:00:28
@John對我來說這很好。我已經用輸出更新了我的帖子。 – Johan 2010-08-03 11:19:12
我在這裏遇到了同樣的問題,並沒有找到任何解決方案。有了這個,我只是不能使用設計! 我使用的是devise 1.0.8,rails 2.3.10,ruby 1.8.7。 – brunosprak 2011-01-25 00:10:04