当我运行服务器浏览器告诉我这样的事情:路由错误的路由匹配[GET] “/ static_pages /家”,教程
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
有人有想法吗?
没有为/ static_pages /家里没有途径(尽管你家的行动是在/)。你在期待什么? – 2012-07-29 15:28:47