When I run server browser show me something like this:
Routing Error
No route matches [GET] "/static_pages/home"
Try running rake routes for more information on available routes.
Rake routes shows me this:
root / static_pages#home
help /help(.:format) static_pages#help
about /about(.:format) static_pages#about
contact /contact(.:format) static_pages#contact
My routes.rb file:
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
Anyone got an idea?
There is no route set for the url ‘/static_pages/home’
Although root points to static_pages controller with action home, it still responds to the path ‘/’ and not ‘/static_pages/home’
If you add
You will get the expected response for ‘/static_pages/home’