View Single Post
  #1 (permalink)  
Old 04-05-2007, 14:43
caolan caolan is offline
new member
 
Join Date: May 2007
Posts: 5
Arrow Ruby on Rails: dispatch.fcgi was not found on this server

I'm deploying a Ruby on Rails application for the first time on shared hosting and I am having some difficulty. I have uploaded my rails application to ~/rails_apps/myapp and set the following permissions in the apps directory:

log 766 (tried 666 but then I couldn't open the directory to read the logs)
tmp 766
public 755
public/dispatch.cgi 755
public/dispatch.fcgi 755
public/dispatch.rb 755


these files remain with the original permissions
public/.htaccess 644
public/index.html 644


I have updated the dispatch.* files shebang (firstline) to the following:
#!/usr/local/bin/ruby


my .htaccess file is as follows (comments omitted):

Code:
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"
and finally, I created a symbolic link from ~/public_html/myapp to ~/rails_apps/myapp/public

Now, when I try to load http://www.my.site/myapp I get this:

Not Found
The requested URL /home/MYUSERNAME/public_html/myapp/index.html was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.37 Server at 87.117.234.234 Port 80


and if I try to load a controller called test in my rails app (http://www.my.site/myapp/test) I get this:

Not Found
The requested URL /home/MYUSERNAME/public_html/myapp/dispatch.fcgi was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.37 Server at 87.117.234.234 Port 80



I'm out of ideas, does anyone else know what else I need to update?
Reply With Quote