ROR 第一例子遇到 UnknownAction 错误

http://guides.rubyonrails.org/getting_started.html

 

遇到错误

ActionController::UnknownAction (No action responded to 2. Actions: create, destroy, edit, index, new, show, and update):

 

 

 

解决方法

 config/routes.rb 里

map.resources 需写在map.connect前面

 

map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'

你可能感兴趣的:(html)