how to specify the file path in rails over Mongrel web server
Posted
by erwin
on Stack Overflow
See other posts from Stack Overflow
or by erwin
Published on 2010-05-06T18:44:58Z
Indexed on
2010/05/06
18:48 UTC
Read the original article
Hit count: 340
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:in
recognize'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:170:in handle_request'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:in
dispatch'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in dispatch_cgi'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in
dispatch'
/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:in
synchronize'
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,
© Stack Overflow or respective owner