how to specify the file path in rails over Mongrel web server
- by erwin
hi, I have a request to load a swf file, flaMovie.swf from rails. The swf file is located the directory /home/user1/railsproj/flash.
I have the code index.rhtml under view directory to show the .swf file,
ID=flaMovie WIDTH=250 HEIGHT=250
When I ran the code, I got the error,
ActionController::RoutingError (No route matches "/home/user1/railsproj/flash/flaMovie.swf" with {:method=:get}):
/vendor/rails/actionpack/lib/action_controller/routing.rb:1441:in recognize_path'
/vendor/rails/actionpack/lib/action_controller/routing.rb:1424:inrecognize'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:170:in handle_request'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:indispatch'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in dispatch_cgi'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:indispatch'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:insynchronize'
My rails project is located in /home/user1/railsproj and the web server is Mongrel web server.
How to specify the path in the rhtml file so that Mongrel server is able to locate the file? Thanks a lot,