views:

129

answers:

1

Hi,

I was developing the Application in Flex and ruby on rails.

It is working fine some times. but some times i am getting routing error.

Error: "No route matches "/index.html" with {:method=>:get}"

Here index.html is my login page

Please help me on this.

Thanks, Ravi

+1  A: 

If you have a static file public/index.html then this should be served up any time a direct request is made for it. The routing engine is simply complaining because no route for that specific path is defined.

Things to check:

  • Do you have a file called public/index.html that can be served up directly?
  • Do you have a route '/index.:format' defined?
  • See how your routing is interpreted by running: rake routes

An easy way to add a route for this particular action is, simply:

route.connect '/index.:format', :controller => 'login', :action => 'new'

I generally add a catch-all route at the bottom of the routing table to handle mystery URLs:

route.connect '/*path', :controller => 'default', :action => 'not_routed'
tadman