Sorry Craig, I am using the forum so I forget that a lot of people
don’t.
I am trying to get rails running on godaddy. I have a client who already
has a godaddy shared hosting account prepaid for another year so
switching hosts is out of the question. They have the proper account -
Linux 2.0 configuration, premium - but I still can’t get the rails app
to work.
I keep getting:
Application error
Rails application failed to start properly"
when trying to open the site. This error message appears to be coming
from the .htaccess file in the /public directory.
The .htaccess file in the /public directory of the rails app contains
this:
General Apache options
AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI
If you don’t want Rails to look in certain directories,
use the following rewrite rules so that Apache won’t rewrite certain
requests
Example:
RewriteCond %{REQUEST_URI} ^/notrails.*
RewriteRule .* - [L]
Redirect all requests not available on the filesystem to Rails
By default the cgi dispatcher is used which is very slow
For better performance replace the dispatcher with the fastcgi one
Example:
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
RewriteEngine On
If your Rails application is accessed via an Alias directive,
then you MUST also set the RewriteBase in this htaccess file.
Example:
Alias /myrailsapp /path/to/myrailsapp/public
RewriteBase /myrailsapp
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
In case Rails experiences terminal errors
Instead of displaying this message you can supply a file here which
will be rendered instead
Example:
ErrorDocument 500 /500.html
ErrorDocument 500 “
Application error
Rails application failed to
start properly”
The Apache Logs say:
SoftException in Application.cpp:589: Could not execute script
“/home/content/w/m/h/wmhines/html/hinesrancholub/public/dispatch.cgi”
Caused by SystemException in API_Linux.cpp:429: execve() for program
“/home/content/w/m/h/wmhines/html/hinesrancholub/public/dispatch.cgi”
failed: No such file or directory
[Wed Apr 12 17:35:37 2006] [error] [client 65.67.54.225] Premature end
of script headers:
/var/chroot/home/content/w/m/h/wmhines/html/hinesrancholub/public/dispatch.cgi
But the dispatch.cgi file is clearly there. Godaddy.com support is
worthless at best and the help.godaddy.com articles on rails provided
zero helpful information. I added the symlink from
lawoffice->hinesrancholub/public and I went back and reuploaded the app
using ASCII instead of binary and now I get this error in the Apache
log:
[Wed Apr 12 23:13:27 2006] [error] [client 65.67.54.225] File does not
exist: /var/chroot/home/content/w/m/h/wmhines/html/lawoffice/[F]
godaddy automatically creates an .htaccess file in the root directory of
the rails app and it contains this:
RewriteEngine On
RewriteRule !/public/dispatch.cgi [F]
It could be a problem with the .htaccess file but I’m not sure…
Another problem might be that I am developing on windows (sucks, i know)
and ftp’ing to linux. This would cause the file permissions to get
screwy wouldn’t it? I tried uploading a test.rb script and the Apache
log says:
SoftException in Application.cpp:589: Could not execute script
“/home/content/w/m/h/wmhines/html/test.rb”
Caused by SystemException in API_Linux.cpp:429: execve() for program
“/home/content/w/m/h/wmhines/html/test.rb” failed: Permission denied
[Wed Apr 12 21:56:06 2006] [error] [client 65.67.54.225] Premature end
of script headers: /var/chroot/home/content/w/m/h/wmhines/html/test.rb
I just don’t know what to do…
Craig W. wrote:
On Thu, 2006-04-13 at 06:35 +0200, Justin C. wrote:
system
#2 I checked out godaddy.com and it appears that, yes, rails is an
option for the type of hosting account that my client has.
then maybe you should re-phrase the problem that you are having because
many (if not most) aren’t using the forum and have long since lost the
context of the problem.
Craig