Rails can't find public folder

I am having a weird problem with Ruby on Rails that’s driving me nuts. When I change htaccess to use fastcgi instead of cgi, all links to images, stylesheets and javascripts stop working because Rails can’t find the public folder anymore. The problem disappears as soon as I change htaccess back but CGI is just too slow to work with, so that’s not really an option.

Any ideas?

It sounds like /public isn’t your document root. Check the wiki for more info:


-Tom Wilcoxen
convergent arts

[quote]It sounds like /public isn’t your document root.


Yeah, that was my first thought too. But that’s not the case.

Everything works fine in normal CGI mode (except that it’s really slow) but as soon as I chance htaccess to use dispatch.fcgi Rails can’t find the public folder anymore. When I switch back to dispatch.cgi it works fine again.

I can’t believe no one else has had this problem , it happens with all my sites.

I’m experiencing the exact same problem. Any resolution??


yeah, I was having the same problem.

I have the same problem

I’m complete newbie in RoR/Dreamhost world, but I did something which worked for me. Initially when I edited .htaccess file to enable fcgi I uncommented example rewrite rule line which was enabling fcgi - in the script it was before line RewriteEngine on. When I moved RewriteRule to after RewriteEngine on images started to appear :slight_smile: