PDA

View Full Version : How to modify htaccess to run Ruby on Rails application with a symlink


Luigi
11-18-2007, 07:50 AM
If the ROR application gives you the error:
Application error
Rails application failed to start properly"

and you have a symlink from public_html to public folder of rails application,
maybe the problem is the lines of htaccess that you have to modify in this way:

# General Apache options
AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI

RewriteEngine On


RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]


ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"

Now www.software-windows.net works fine!

nnevvinn
12-12-2007, 02:51 PM
I have my htaccess file set up just like this and am still having no luck getting the rails app to start. I still get "Application error Rails application failed to start properly". I am using RadiantCMS.

Any other ideas as to what I might try changing?

Thanks,
Nevin