當我運行服務器瀏覽器告訴我這樣的事情:路由錯誤的路由匹配[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