I’m finding my image and stylesheets are resolving fine on windows/webbrick, but not on unix (Dreamhost). I can’t navigate to them on dreamhost and I get a “File not Found - Change this error message for pages not found in public/404.html”
One difference is that on dreamhost (fastcgi) I do use Capistrano so my rails application is under /current/, but I have mapped this in the dreamhost domain setup tool.
Can anyone spot if something is wrong in my .htaccess file below? Is the idea that static files (e.g. images/stylesheets) are supposed to be covered off in .htaccess with no entries required for them in routes.rb?
Your domain points to your public/ directory right? I'm sure it does but
just to check...
I don't think I use the rewrite rules at all, maybe that slows it down a
bit as static requests do go through rails. But here is the complete
.htaccess which resides in the public/ directory( I haven't mastered
Apache config so I've barely touched this file ):
My domain does point to current/public yep…actually I am getting a routing error (recognition railed) when navigating directly to a stylesheet so this probably indicates I guess that the rewrite rules aren’t working.
(a) Can anyone spot an issue with the .htaccess file below, and in particular the following portion of it?
RewriteCond %{REQUEST_URI} ^/stylesheets.*
RewriteRule .* - [L]
(b) If I update .htaccess is there anything I need to do to make it take effect? (again I’m on Dreamhost [fastcgi])
PS. Sorry, can I add question c too below (refer previous post re (a) and (b) questiosn):
(c) Given that my direct request for one of the image files is making it to rails (as I get a ActionController::RoutingError (Recognition failed for “/images/arrow_right.gif”), and that this request works fine locally on webbrick but not at dreamhost (e.g. http:///images/arrow_right.gif) then:
should it be the case that the rails routes.rb and the routing method should match up a direct request without having the need for an entry in routes.rb to cover this. That is should I need to put something into routes.rb
to cover off the ability to pick up static type files from /public?