Rails is loaded from routes instead of a shared folder

I have an app for rails.

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

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

My route.rb file looks like this

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

Then I started to run the application using apache. When I am in myurl.com/swfs/something.swf, the following error message appears:

Routing Error

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

It seems like, for some reason, it loads using rail routes, and not in the first place. Any suggestions?

+3
source share
2 answers

? - /public/ rails?

+1
  • - swf ?
  • , 's' swfs, swf
0

Source: https://habr.com/ru/post/1736847/


All Articles