views:

186

answers:

2

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?

+1  A: 

Are we talking Passenger? Did you set the web root of the app to /public/ instead of the rails root?

Matchu
Matchu probably has it right, it is likely a configuration issue on your server.
Karl
A: 
  • Did you have any swf controller by accident?
  • If not, try removing the 's' from swfs to be just swf
jpartogi