A RoutingError occurs when Rails cannot match the current URL to a routing rule.
It usually looks something like this:
Routing Error
No route for path: "no/url/here"
Failure reasons:
1. <ActionController::Routing::Route "" when {:action=>"redirect", :controller=>"home"}> failed because unused components were left: no/url/here
2. <ActionController::Routing::Route "forum/thread/:id/:title/:posts" || {:id=>nil} when {:action=>"thread", :controller=>"forum"}> failed because value for component "forum" doesn't match no
3. <ActionController::Routing::Route "news" when {:action=>"list", :controller=>"news"}> failed because value for component "news" doesn't match no
4. <ActionController::Routing::Route "news/view/:id/:headline" || {:id=>nil} when {:action=>"view", :controller=>"news"}> failed because value for component "news" doesn't match no
5. <ActionController::Routing::Route "tips/view/:id/:title" || {:id=>nil} when {:action=>"view", :controller=>"tips"}> failed because value for component "tips" doesn't match no
6. <ActionController::Routing::Route "users/verify/:id/:verify_key" || {:id=>nil} when {:action=>"verify", :controller=>"users"}> failed because value for component "users" doesn't match no
7. <ActionController::Routing::Route ":controller/:action/:id" || {:id=>nil, :action=>"index"}> failed because no controller found at subpath no/url/here
This shows the requested path, and all possible routes along with why each route failed to match. Very useful for trouble shooting your routes.
NOTE: most of the time you don’t want users to see this, it’s merely a development aid. Make sure to switch your app’s environment into Production Mode when you deploy. This way Rails will serve your 404 document instead of this ugly error.