rails is loading from routes instead of the public folder

Posted by djacobs7 on Stack Overflow See other posts from Stack Overflow or by djacobs7
Published on 2010-03-14T01:01:18Z Indexed on 2010/03/14 1:05 UTC
Read the original article Hit count: 502

Filed under:
|
|
|

I have a rails app.

I have a file in #{RAILS_ROOT}/public/swfs/somthing.swf.

Locally, when running with webrick, when I go to the url localhost:3000/swfs/something.swf, my swf loads just fine.

My routes.rb file looks like the following

ActionController::Routing::Routes.draw do |map|
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
end

Then, I started running the app with apache. When I visit myurl.com/swfs/something.swf, I get the following error message:

Routing Error

No route matches "/swfs/something.swf" with {:method=>:get}

It looks like, for some reason, it is loading using the rails routes, instead of going to the public folder first. Any suggestions?

© Stack Overflow or respective owner

Related posts about rails

Related posts about ruby