Godaddy & rails

Sorry to trouble the list with this question… Do many rails developers
run or test rails apps on godaddy hosted servers? Is there any
documentation (outside of what godaddy provides) about uploading and
testing rails apps there? Perhaps someone has written a tutorial? I
googled, but found little to no info about it other than the sparse
godaddy docs.

Thanks!

Hi, you can find information at the following location:

Next, in the 'Search for" text field, type “rails” without the quotes.
It seems that they try to work with you because I actually ask the
questions about rails and the next thing you know it becomes an option
for the deluxe and premium shared accounts. Thus, this becomes a big
when for doing RoR development for future clients. Well, I must go
and I wish that the information is helpful.

Peace,

-Conrad

Conrad T. wrote:

Hi, you can find information at the following location:

http://help.godaddy.com

Next, in the 'Search for" text field, type “rails” without the quotes.
It seems that they try to work with you because I actually ask the
questions about rails and the next thing you know it becomes an option
for the deluxe and premium shared accounts. Thus, this becomes a big
when for doing RoR development for future clients. Well, I must go
and I wish that the information is helpful.

Thanks Conrad. I got it working. It was easier than I thought it would
be. Godaddy is cheap and good. I hope to test some rails stuff with
them… don’t know if their shared servers can handle slashdotting
though :wink:

I just got rails working on Godaddy. Here’s what I did:

  • create xx app locally (rails xx)
  • CGI admin: create dir xx; ftp xx app; symlink abc to xx
  • then …/abc --> rails welcome page (…/xx doesn’t work!)
  • …/abc/external/aaa finds xx/app/views/external/aaa.rhtml

HTH, John

Did anyone ever figure out how to get rails running on godaddy? I have a
client who already has a godaddy 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 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

The .htaccess file in the root directory of the rails app contains this:
RewriteEngine On
RewriteRule !/public/dispatch.cgi [F]

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”

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.

Anyone got a suggestion? I think it is a problem with the .htaccess file
but I’m not sure…

unknown wrote:

Sorry to trouble the list with this question… Do many rails developers
run or test rails apps on godaddy hosted servers? Is there any
documentation (outside of what godaddy provides) about uploading and
testing rails apps there? Perhaps someone has written a tutorial? I
googled, but found little to no info about it other than the sparse
godaddy docs.

Thanks!

I suggest if you’re on a dedicated host from godaddy yum upgrading to
fedora
core 5… then follow
http://www.digitalmediaminute.com/howto/fc4rails/

Todd F. wrote:

I suggest if you’re on a dedicated host from godaddy yum upgrading to
fedora
core 5… then follow
http://www.digitalmediaminute.com/howto/fc4rails/

unfortunately that isn’t an option as they are on a shared host and
won’t/shouldn’t upgrade to a dedicated host for this simple website…
It is a simple site for a law firm, no database, only static content. I
just made it in rails since i have been using it for other projects and
like the templating capabilities. All the godaddy documentation and
marketing bs says that is should work, but I can’t get it to. I am
pretty sure it is a problem with the .htaccess file but I don’t know
what needs to be changed.

Hey, law firm has the money to pay !! so ask them some big bucks for the
solution I am going to present you (and give me some part of it)

Just cache the pages locally on your development machine (with Lighttpd)
and
then just put the content of the public folder onto godaddy server,
without
rails …

On Thu, 2006-04-13 at 03:48 +0200, Justin C. wrote:

I really need to figure out how to get it to work on the godaddy.com
shared hosting. If it were up to me the site would not be hosted on
godaddy, but unfortunately i don’t have that luxury. That is what they
have already paid for and that is were they want it to work. I am about
to scrap rails and just create a static site if I can’t get this to work
by friday.


#1 - you should develop on your own setup and not on shared hosting
system

#2 - did you ask GoDaddy.com if they have a rails option for your
account?

Craig

Roberto S. wrote:

Hey, law firm has the money to pay !! so ask them some big bucks for the
solution I am going to present you (and give me some part of it)

Just cache the pages locally on your development machine (with Lighttpd)
and
then just put the content of the public folder onto godaddy server,
without
rails …

I really need to figure out how to get it to work on the godaddy.com
shared hosting. If it were up to me the site would not be hosted on
godaddy, but unfortunately i don’t have that luxury. That is what they
have already paid for and that is were they want it to work. I am about
to scrap rails and just create a static site if I can’t get this to work
by friday.

Craig W. wrote:

On Thu, 2006-04-13 at 03:48 +0200, Justin C. wrote:

I really need to figure out how to get it to work on the godaddy.com
shared hosting. If it were up to me the site would not be hosted on
godaddy, but unfortunately i don’t have that luxury. That is what they
have already paid for and that is were they want it to work. I am about
to scrap rails and just create a static site if I can’t get this to work
by friday.


#1 - you should develop on your own setup and not on shared hosting
system

#2 - did you ask GoDaddy.com if they have a rails option for your
account?

Craig

#1 I do develop on my own setup. Everything works great on my
development machine, granted I have only been running the webrick
server.

#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.

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

Has anyone setup LightHTTPD behind Apache on GoDaddy server ? We’re
planning to get a godaddy server and, I guess by default it comes with
Plesk.

I’m still not sure if we should go with Apache 2.x/FastCGI or Lighty.

Thanks,
Pratik

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

Hey Justine, I have an account at godaddy.com and I would recommend
speaking with their support staff because they are available 24/7.
Also, I haven’t had a chance to test the deployment of a rails
application and it may be possible that their’s something wrong on
Godaddy’s end.

Next, you really don’t get any access to the command line with a
shared account and you’ll need a virtual dedicated server to gain this
type of access with them. It’s inexpensive but you’re responsible for
maintaining the server (i.e. you’re the system administrator). For
example, if something isn’t installed on the server, you’ll do it or
have someone else do it for you.

I know all of this because one of my clients switched from a shared
(i.e. Windows) to a dedicated (i.e. Linux) server. However, I was
very impressed because they had this new account ready for us within
30 minutes and I began moving the sources that night. Now, that was
very impressive. At this time, I’m wanting them to switch from PHP to
Rails but I need to do some more research and actually show them a
proof of concept. Also, I want to make sure that I can get Rails
going with Apache first. Gotta go and I wish you the best of luck.

Peace,

-Conrad

ps: Please speak with you client about getting some account
information so that you
can talk directly to support instead of going through your client.

Justin C. <copeland.justin@…> writes:

I just don’t know what to do…

Hi Justin,

I work in development for Go Daddy Software and saw your question
regarding our Ruby on Rails support for our Shared Hosting product.

Not having looked at your account, I would suggest looking at the line
endings of your dispatch.cgi and/or dispatch.fcgi. Your error looks
like it is using DOS line endings. The hint from the error is that
your dispatch.cgi file cannot be found, even though it is definitely
there.

Another common error is the interpreter line of dispatch.cgi is still
pointing to a Win32 installation of ruby.exe. That line should be
“#!/usr/local/bin/ruby” on our shared hosting servers.

On a related note, we support using FastCGI with our Ruby on Rails
implementation, as well, if you’d like to get that performance
improvement.

I hope this helps you get going. Please feel free to contact our
technical support with any questions, they’re available 24x7. We also
have a pretty robust knowledgebase available to you and your client
for any other issues. This question is not in there yet but will be
added shortly.

Good luck, and thanks for using our hosting services.

jason

Me and a good friend of mine managed to solve the problem. We wrote a
solution on a site which might soon become a good webdev blog :slight_smile:

Comments are welcome on: [email protected]

Hope you like it although it was done in 10minutes or so. We’ll try to
tune it up a bit.

Hello,

Justin C. [email protected]
writes:

Rails application failed to start properly"

For better performance replace the dispatcher with the fastcgi one

RewriteBase /myrailsapp

Example:

failed: No such file or directory

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…

If you are able to run rails app on godaddy, then please let us know.
Even I
am facing problem getting rails to work on godaddy.

Best.

Surendra S.
http://ssinghi.kreeti.com, http://www.kreeti.com
Read my blog at: http://cuttingtheredtape.blogspot.com/
,----
| “All animals are equal, but some animals are more equal than others.”
| – Orwell, Animal Farm, 1945
`----

Hi all. I ask everybody to click it.:::::
http://s2.bitefight.hu/c.php?uid=17861
Helps much with this for me and for the Hungarian society.
and I ask everybody for it that let him not regard this as irregular
one.
I say thank you for it in the Hungarian people’s name.
a thousand I say thank you for it

Step by step deploy a Ruby application on GoDaddy
http://wanghaiyang.me/archives/166