Henning Sprang
2006-Mar-07 23:08 UTC
[Rails] setting relative_url_root for static files in webrick
Hi, I am using webrick and want my application not be available on http://localhost:3000/ but http://localhost:3000/rails. So I found out I can set ActionController::AbstractRequest.relative_url_root = "/rails" in environment.rb. This works for controllers without further modifications. But for the static files, I have to put a "rails" directory into the public directory, and move my static files in there. This was the only way I found to solve this. But I imagine it should be possible to keep the original public structure, but tell webrick to serve that in /rails instead of /. Is this possible? Henning
Possibly Parallel Threads
- relative_url_root and javascript_include_tag
- Using config.action_controller.asset_host with ActionController::AbstractRequest.relative_url_root
- Bug in AbstractRequest.path() ?
- Facebooker and file_column
- Rails3 -- Replacement for ActionController::Base.relative_url_root?