当我运行服务器浏览器时,会显示如下内容:
Routing Error
No route matches [GET] "/static_pages/home"
Try running rake routes for more information on available routes.
耙路线向我展示了这一点:
root / static_pages#home
help /help(.:format) static_pages#help
about /about(.:format) static_pages#about
contact /contact(.:format) static_pages#contact
我的 routes.rb 文件:
MyApp::Application.routes.draw do
root :to => 'static_pages#home'
match '/help', :to => 'static_pages#help'
match '/about', :to => 'static_pages#about'
match '/contact', :to =>'static_pages#contact'
end
有人有想法吗?