GoDaddy Application deployment

I know GoDaddy is far from being an ideal host for a rails application
but this is the one my client has and I don’t really have a choice. I
tried to deploy the site yesterday and followed the instructions
available on:
http://www.ericdaugherty.com/blog/2007/07/rails-on-godaddy.html
http://lists.rubyonrails.org/pipermail/rails/2006-July/056959.html
http://wiki.rubyonrails.com/rails/pages/RailsWebHostsGoDaddyComments
http://help.godaddy.com/article.php?article_id=1406&topic_id=&prog_id=GoDaddy&#location

… but the site doesn’t work.

  1. Java is not enabled.

  2. I have a “rails” directory inside my root “/” directory and created
    a symbolic link (elle -> rails) in the CGI Admin

  3. I froze gems before deployment

  4. I edited dispatch.* files to reference #!/usr/local/bin/ruby

  5. I uploaded files to “rails” directory

  6. I chmod dispatch.* files to 755

  7. public/.htaccess file contains the following:
    AddHandler fastcgi-script .fcgi
    AddHandler cgi-script .cgi
    Options +FollowSymLinks +ExecCGI
    RewriteEngine On
    RewriteBase /rails
    RewriteRule ^$ index.html [QSA]
    RewriteRule ^([^.]+)$ $1.html [QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

  8. config/environment.rb file contains the following:
    ENV[‘RAILS_ENV’] ||= ‘production’
    RAILS_GEM_VERSION = ‘1.2.3’ unless defined? RAILS_GEM_VERSION
    ENV[‘GEM_HOME’] = ‘/usr/local/lib/ruby/gems-dev/1.8’

  9. MySQL db is set up and database.yml was updated with the correct
    details.
    host: p50mysql59.secureserver.net
    port: 3306

And the site doesn’t work. I get a 403 Forbidden error.
And GoDaddy support team keeps emailing me, saying the root directory
is missing a default index file.

I really don’t have a choice with web hosting selection and I need
this site to run. It’s not going to be a high traffic site. The url is

Can anyone please please help?

TIA,
Elle

Elle,

your actual url would be http://elitehousings.com/elle/ and when you
navigate to that, you get a more descriptive error. GoDaddy is
correct about missing the index.html file, but that’s because they’re
looking at the root of your site and not the rails app.

It does look like it’s a permissions error on dispatch.fcgi though.

On 11/29/07, elle [email protected] wrote:

… but the site doesn’t work.
AddHandler cgi-script .cgi
RAILS_GEM_VERSION = ‘1.2.3’ unless defined? RAILS_GEM_VERSION
is missing a default index file.


“Instead of building newer and larger weapons of mass destruction, I
think mankind should try to get more use out of the ones we have.”,
Jack Handey

Elle,
On second look, it looks like you’ve uploaded your app directly to the
“rails” folder. Ideally they’re setup is to create a “rails apps”,
then all of your applications would be sub directories off of it.

e.g.
/rails_apps/site1/
/rails_apps/site2/

The instructions you’ve followed probably won’t work without it being
in this format.

On 11/29/07, Marlon M. [email protected] wrote:

     AddHandler fastcgi-script .fcgi
   ENV['RAILS_ENV'] ||= 'production'

And GoDaddy support team keeps emailing me, saying the root directory


“Instead of building newer and larger weapons of mass destruction, I
think mankind should try to get more use out of the ones we have.”,
Jack Handey


“Instead of building newer and larger weapons of mass destruction, I
think mankind should try to get more use out of the ones we have.”,
Jack Handey

I think Godaddy is running ruby gems version 1.1.6

On Nov 29, 2007 3:27 PM, Marlon M. [email protected] wrote:

The instructions you’ve followed probably won’t work without it being

looking at the root of your site and not the rails app.

available on:
a symbolic link (elle -> rails) in the CGI Admin
RewriteRule ^$ index.html [QSA]
details.
http://elitehousings.com/

Jack Handey

“Eppure si muove”

There has got to be a better option than shared hosting with Godaddy.
If your client wants the application they’ve paid to be developed to
work, and work well, they’re going to have to step up and pay for a
real hosting option.

I’ve actually had great success running a rails app on GoDaddy’s
virtual dedicated servers… so if they want to stay with GoDaddy,
that’s definitely an option. Just make sure not to use their
java-based cpanel software. Slows the server way down just to have it
running. (When I complained to support of slow speeds, that’s what
they told me to disable, and that did the trick)

Brian

So, I changed the location of my redirect file and this time I got:
Application error (something was wrong in the application and it
didn’t load).
So I thought this is progress. I deleted all the files and uploaded
the whole application again – to ensure all the files are there. But
now I’m getting “Failed to open page” again.

Help anyone? please.

Elle

GoDaddy support team said i should have the .htaccess file in the root
directory. I also changed the symbolic link to say “new”. And uploaded
a redirect in the root folder. But now if I go to either
http://elitehousings.com
or http://elitehousings.com/new/ the page just doesn’t load and after
a while I get “failed to open page” error.

The client had a different web hosting company – which support and
service was shocking. He then changed to GoDaddy without consulting
with me. I just want the application to load and work – even really
slow. I could then advice the client to upgrade to the dedicated
server for faster connection. But for now, what should I do?

TIA,
Elle

Nope. Working on a mac.
If I change my .htaccess rule:
RewriteBase /rails
I get Application Error - Application failed to load properly
And if I have the rule pointing to /new
The error is failed to load page.

What am I doing incorrectly?

Elle

are you sure your app runs under 1.1.6?

On Nov 30, 2007 3:13 PM, elle [email protected] wrote:

Elle

Elle

that’s definitely an option. Just make sure not to use their

I think Godaddy is running ruby gems version 1.1.6
it.

Elle,

http://www.ericdaugherty.com/blog/2007/07/rails-on-godaddy.html

  1. Java is not enabled.
    AddHandler cgi-script .cgi
    RAILS_GEM_VERSION = ’ 1.2.3’ unless defined?
    And the site doesn’t work. I get a 403 Forbidden error.
    Can anyone please please help?


“Instead of building newer and larger weapons of mass destruction, I
think mankind should try to get more use out of the ones we have.”,
Jack Handey

“Eppure si muove”

Elle froze the gems, but now I’m wondering if Rails was frozen also?
In every successful godaddy deployment, I’ve always frozen rails.

On 11/30/07, Jose G. [email protected] wrote:

The error is failed to load page.

So I thought this is progress. I deleted all the files and uploaded

directory. I also changed the symbolic link to say “new”. And
The client had a different web hosting company – which support and

There has got to be a better option than shared hosting with
java-based cpanel software. Slows the server way down just to

http://www.ericdaugherty.com/blog/2007/07/rails-on-godaddy.html

  1. Java is not enabled.
    AddHandler cgi-script .cgi
    RAILS_GEM_VERSION = ’ 1.2.3’ unless defined?
    And the site doesn’t work. I get a 403 Forbidden error.
    Can anyone please please help?


“Instead of building newer and larger weapons of mass destruction, I
think mankind should try to get more use out of the ones we have.”,
Jack Handey


“Instead of building newer and larger weapons of mass destruction, I
think mankind should try to get more use out of the ones we have.”,
Jack Handey

change to development mode and check the logs.

On Nov 30, 2007 3:30 PM, Marlon M. [email protected] wrote:

Nope. Working on a mac.

now I’m getting “Failed to open page” again.
uploaded
and

On Nov 30, 9:34 am, “Brian McKelvey” [email protected]

real hosting option.
they told me to disable, and that did the trick)
[email protected]>
it.

On 11/29/07, Marlon M. < [email protected]> wrote:

have

  1. I froze gems before deployment
    RewriteRule ^$ index.html [QSA]

root directory

“Eppure si muove”


“Instead of building newer and larger weapons of mass destruction, I
think mankind should try to get more use out of the ones we have.”,
Jack Handey

“Eppure si muove”

are you uploading from a windows workstation? If so, you may need to
change the line endings to unix type instead of ms-dos on your
dispatch.* files

On 11/29/07, elle [email protected] wrote:

Elle

with me. I just want the application to load and work – even really

work, and work well, they’re going to have to step up and pay for a

your actual url would behttp://elitehousings.com/elle/andwhen you

tried to deploy the site yesterday and followed the instructions
2. I have a “rails” directory inside my root “/” directory and created
RewriteBase /rails
9. MySQL db is set up and database.yml was updated with the correct
http://elitehousings.com/


“Instead of building newer and larger weapons of mass destruction, I
think mankind should try to get more use out of the ones we have.”,
Jack Handey

“Eppure si muove”


“Instead of building newer and larger weapons of mass destruction, I
think mankind should try to get more use out of the ones we have.”,
Jack Handey

Elle, here’s the pertinent parts of the htaccess file of a site
currently working on godaddy.

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

On 11/30/07, elle [email protected] wrote:

Elle

Elle

with me. I just want the application to load and work – even really

work, and work well, they’re going to have to step up and pay for a

your actual url would behttp://elitehousings.com/elle/andwhenyou

tried to deploy the site yesterday and followed the instructions
2. I have a “rails” directory inside my root “/” directory and created
RewriteBase /rails
9. MySQL db is set up and database.yml was updated with the correct
http://elitehousings.com/

“Instead of building newer and larger weapons of mass destruction, I
think mankind should try to get more use out of the ones we have.”,
Jack Handey


“Instead of building newer and larger weapons of mass destruction, I
think mankind should try to get more use out of the ones we have.”,
Jack Handey

Marlon,
These lines seem to be the same as mine:
RewriteBase /rails

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

Some of my questions are very basic (a bit new to rails):

  1. Not sure what version of rails I’m using. Have used Hivelogic’s
    post to set up my environment in the beginning of September
  2. Should I change back to development mode on the web server? or my
    computer? and is this by changing ENV[‘RAILS_ENV’] ||= ‘production’?
  3. I used “rake rails:freeze:gems” before the first time I uploaded
    the files to the web server. If rails is frozen as well-- what should
    I do?

Thanks for all the help guys,
Elle

Also, went back to my computer, changed environment to development,
started mongrel and the application is working on my computer.

Elle

I tried calling GoDaddy’s support and their reply was: This is custom
scripting and we can’t help you with this.
I also realised that what I’m getting is an error 500. But what should
I do?

Please help anyone.
Elle

try changing you development envrionment to 1.1.6
and see if it works.

On Nov 30, 2007 6:13 PM, elle [email protected] wrote:

RewriteBase /rails
computer? and is this by changing ENV[‘RAILS_ENV’] ||= ‘production’?

currently working on godaddy.

RewriteBase /rails

are you uploading from a windows workstation? If so, you may

didn’t load).
On Nov 30, 9:46 am, elle [email protected] wrote:

The client had a different web hosting company – which
Elle

real hosting option.
that’s what
[email protected]> wrote:

/rails_apps/site1/

your actual url would

http://www.ericdaugherty.com/blog/2007/07/rails-on-godaddy.html

  1. Java is not enabled.
    AddHandler cgi-script .cgi
    ENV[‘RAILS_ENV’] ||= ‘production’

http://elitehousings.com/
ones we have.",

"Instead of building newer and larger weapons of mass destruction,
I

think mankind should try to get more use out of the ones we have.",
Jack Handey

“Eppure si muove”