Sunday, January 15, 2006
Bug in Rails 1.0 for fcgi when under virtual host
I upgraded to Rails 1.0 on Apache running on Linux with fcgi 0.8.6.1,
I have one Rails project running under virtual host, the other under aliased path, and both are broken the same way.
Rolling back to Rails 0.14.3 fixes the problem immediately.
This is not a problem under WEBrick, leading me to think it is to do with the .htaccess file URL rewriting. Looking at the generated paths in the HTML, I can see what the problem is too, in that typically a path like /images/foo.gif in v0.14.3 is now incorrectly rendered as /dispatch.fcgi/images/foo.gif i.e. the name of the fcgi file in the "public" directory has somehow been appended to the base url, causing the document root to be pushed down one level. In the log file, I get this exception for each requested static file:
ActionController::RoutingError (Recognition failed for "/images/links.gif"):
The net effect is the contents of the page are still rendered correctly, however, the style, images, and all scriptaculous features are lost.
I have raised a bug report with Rails Trac, number #3493
posted by David at 6:01 PM
links to this post