# Hosting Ruby on Rails on GoDaddy - Solved!

**URL:** <https://www.ruby-forum.com/t/hosting-ruby-on-rails-on-godaddy-solved/143533>\
**Category:** Rails\
**Created:** [July 20, 2008, 2:15am UTC](https://www.ruby-forum.com/t/hosting-ruby-on-rails-on-godaddy-solved/143533 "2008-07-20T02:15:17Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![datakix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8baadc/32.png) [@datakix](https://www.ruby-forum.com/u/datakix)\
**Post date:** [July 20, 2008, 2:15am UTC](https://www.ruby-forum.com/t/hosting-ruby-on-rails-on-godaddy-solved/143533/1 "2008-07-20T02:15:17Z")

</div>

Hello all,

I know how very challenging it can be to host a ROR application of  
GoDaddy. The good news is that after 10 days of blood, sweat and  
tears, I finally got it

to work!!!

First, let me start by saying that I’m somewhat of a newbie to Rails.  
However, I’ve been programming in Java and/or C# for the last 10+  
years so I’ve been

around the block a couple times when it comes to this stuff. Secondly,  
this was undoubtedly one of the most challenging development tasks  
I’ve undertaken

this year, so please don’t feel bad if you didn’t get it to work the  
first 10 attempts because it took me waaaaay more than that!. Well,  
with that said, I’m

sure you’re eager to get to the how-to so let’s do it.

Right now, I’d love to write a few paragraphs on how GoDaddy’s Ruby on  
Rails support and documentation is abominal, but that would only be  
preaching to the

choir… Instead, let’s make some lemonade 🙂

One more thing, please forgive and typing/spelling errors, I’m writing  
this in Notepad.

## My Setup

- Linux Deluxe Plan
- Windows Vista
- Ruby 1.8.5-22 Final ([http://rubyforge.org/frs/?group\_id=167](http://rubyforge.org/frs/?group_id=167))
- Gem 0.9.2
- Rails 1.1.6 (I know you’re looking for 2.0 bare w/me)
- FileZilla 3.0.11.1 ([filezilla-project.org](http://filezilla-project.org))
- Subversion 1.4.5 ([http://subversion.tigris.org/](http://subversion.tigris.org/))

Tip - On Vista and XP, if you uninstall a version of Ruby, restart  
your computer before reinstalling another version of Ruby, otherwise  
the Environment

Variables won’t get set properly.

* * *

## Installing Rails

Ok, here is where I was REALLY confused early on, mostly because I  
didn’t understand terminology (i.e. what is a RubyGem, what does  
freeezing a Gem do). I

was also really confused by GoDaddy’s documentation. In some places,  
they claim to support Rails 1.1.2, in others it’s 1.1.6. Anyway, to  
correctly install

Rails for version 1.1.6:

1. Run the Ruby185-22.exe installer.
2. Open a command prompt and type: gem install rails --version 1.1.6

That’s it. [DO NOT download RubyGems 1.2.0 (or any other version) and  
then run “ruby setup.rb”!!! Same goes for any other version of Rails,  
don’t do it.]

To ensure you’ve setup everything correctly, let’s check the ROR  
component’s versions:

C:\Development\Projects\Ruby\>ruby -v  
ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-mswin32]

C:\Development\Projects\Ruby\>gem -v  
0.9.2

C:\Development\Projects\Ruby\>rails -v  
Rails 1.1.6

* * *

## Installing Subversion

Go ahead and install Subversion if you already haven’t. It’s a version  
control system like CVS or Visual Source Safe.

* * *

## Creating a test project

– Let’s keep it simple and create helloworld

C:\Development\Projects\Ruby\>rails helloworld

create  
create app/controllers  
create app/helpers  
…  
…

– Change to the helloworld directory

C:\Development\Projects\Ruby\>cd helloworld

– Create a controller and some basic actions

C:\Development\Projects\Ruby\helloworld\>ruby script\generate  
controller Say hello

./script/…/config/boot.rb:28:Warning: require\_gem is obsolete. Use  
gem instead  
.  
exists app/controllers/  
exists app/helpers/  
create app/views/say  
exists test/functional/  
create app/controllers/say\_controller.rb  
create test/functional/say\_controller\_test.rb  
create app/helpers/say\_helper.rb  
create app/views/say/hello.rhtml

– Ok, let see if it works

C:\Development\Projects\Ruby\helloworld\>ruby script/server

./script/…/config/boot.rb:28:Warning: require\_gem is obsolete. Use  
gem instead  
.  
=\> Booting WEBrick…  
=\> Rails application started on [http://0.0.0.0:3000](http://0.0.0.0:3000)  
=\> Ctrl-C to shutdown server; call with --help for options  
[2008-07-18 22:54:52] INFO WEBrick 1.3.1  
[2008-07-18 22:54:52] INFO ruby 1.8.5 (2006-12-25) [i386-mswin32]  
[2008-07-18 22:54:52] INFO WEBrick::HTTPServer#start: pid=3680  
port=3000  
127.0.0.1 - - [18/Jul/2008:22:55:11 Eastern Daylight Time] “GET / HTTP/  
1.1” 200  
7552

– Open a browser to: [http://localhost:3000/Say/hello](http://localhost:3000/Say/hello)

Say#hello

Find me in app/views/say/hello.rhtml

* * *

## Preparing for launch to GoDaddy

Ok, just to quickly recap, all we’ve done so far is to install ROR,  
Subversion and create a very simple Rails app - nothing special.  
Everything is working

locally, so now it’s time to prepare for FTPing to GoDaddy. This is  
another area where I was REALLY confused initially. So before we go  
any further I’m going

to outline and explain what we’re going to do and why.

1. Freeze the application. When you “freeze” a Rails app, your  
application will always use that version of Rails and the associated  
Ruby Gems, regardless of

what version is installed on the GoDaddy server. In essence, even  
though GoDaddy only supports version 1.1.6, by ‘freezing’ your  
application, you literally

bundle your entire local environment into your application. So  
theoretically, you can run version 2.x.x if you ‘freeze’ your  
application before deploying.

Note, I have not tried this as of yet, but I do have a ‘frozen’  
version of Rails 1.2.6 running on GoDaddy. So if 1.2.6 runs, then it’s  
very likely 2.x.x will

run as well as long as it’s frozen.

1. Make a copy of the helloworld application and rename it  
hellworld\_godaddy.  
This is a best practice for me because it allows me to have a working  
version of my app running on Vista and a ‘ready to promote’ version  
for the Linux

server.

1. Configure some files in the /public and /config directory for use  
on GoDaddy.

EASY as 1-2-3…

Ok, go ahead and stop the WEBrick server by typing Ctrl C

First, let’s Freeze our application to version 1.1.6  
C:\Development\Projects\Ruby\helloworld\>rake rails:freeze:edge  
TAG=rel\_1-1-6  
[\*\*\*\* Note: this may take 30+ seconds \*\*\*\*]

Second, copy of the helloworld application and rename it  
hellworld\_godaddy

Finally, we need to edit some files in our hellworld\_godaddy  
directory.

→ /config/environment.rb  
Edit the top section of /config/environment.rb to look like this:

ENV[‘RAILS\_ENV’] ||= ‘development’

# Specifies gem version of Rails to use when vendor/rails is not

present  
ENV[‘GEM\_HOME’] = ‘/usr/local/lib/ruby/gems-dev/1.8’  
RAILS\_GEM\_VERSION = ‘1.1.6’

→ /public/dispatch.rb, dispatch.cgi, and dispatch.fcgi  
Edit the first line in all of the dispatch files to look like this:

#!/usr/local/bin/ruby

→ /public/.htaccess

Ok, a brief pause is needed here to explain some things. .htaccess  
files are generally used for many reasons, but it’s common in shared  
hosting for these

files to be used to redirect to a subdirectory preventing users from  
knowing the real location of your application on a server. GoDaddy  
uses a 'Symbolic Link

name’ which is really just an ‘alias’. So in our case we’re going to  
create a subdirectory called ‘helloworld\_godaddy’ and a Symbolic Link  
name of

‘helloworld’.  
So all this means is that when a user goes to  
[mywebsite.com is available for purchase - Sedo.com](http://www.mywebsite.com/hellworld),  
they’re actually referencing the data and files from the  
helloworld\_godaddy

subdirectory. The most important thing to know about this file is that  
it should contain a ‘RewriteBase’ directive which explicitly sets the  
base URL for

per-directory rewrites. So in our case we want the base URL to be  
rewritten as ‘helloworld’. Another useful tip is to use the .fcgi  
(FastCGI) protocol; this

is done by simply changing the .cgi extensions to .fcgi.

Edit the middle section of the .fcgi file to look like this:

RewriteBase /helloworld  
RewriteRule ^$ index.html [QSA]

RewriteRule ^([^.]+)$ $1.html [QSA]

RewriteCond %{REQUEST\_FILENAME} !-f

RewriteRule ^(.\*)$ dispatch.fcgi [QSA,L]

Ok, now we’re almost there! The last part is the easiest 🙂

* * *

## Lock and Load

Log into your GoDaddy account and open up the CGI Admin tool.

In the ‘Directory name:’ textbox, type my\_rails\_apps. GoDaddy will  
automatically create an .htaccess file in the new directory. Open the  
file and change  
dispatch.cgi to dispatch.fcgi. [Note: This step is not necessary]

Open up FileZilla and connect to your GoDaddy root directory. Double  
click the my\_rails\_apps directory.

In the Filezilla toolbar, select Edit → Settings → FileTypes and  
change the Default transfer type to ASCII.

Select your helloworld\_godaddy directory, right click and select  
upload. \*\*\* IMPORTANT STEP \*\*\*

[Note: this process will take about 2-3 minutes]

(If you’re new to the GoDaddy admin tool, you’ll need to create an FTP  
user by going to Hosting Control Center → Settings → Manage FTP  
settings)  
(To figure out your FTP URL, username and password, go to Hosting  
Control Center → Content → FTP Client → Click Disconnect, then  
Connect)  
(Make sure you turn on your error logs, go to Hosting Control Center –

> Settings → Error Logs → click the ‘Update’ button)

Ok, now go back to the CGI Admin tool and select the ‘Ruby’ tag or  
refresh the page.

In the Create Rails Symbolic Link section, click the Show Rails  
‘Applications link’.

If all went well, you should see ‘my\_rails\_apps/helloworld\_godaddy’ in  
the ‘Choose a rails app:’ drop down box.

Enter a link name of ‘hellworld’ (no quotes), then click the ‘Create’  
button.

[Link created: helloworld is a symbolic link to my\_rails\_apps/  
helloworld\_godaddy]

* * *

## LIFT OFF!!

The very last step is setting permissions.

Reconnect to your root directory via Filezilla and open up the /  
my\_rails\_apps/helloworld\_godaddy/public directory.

Select the dispatch.cgi and dispatch.fcgi file, right click and select  
‘file attributes’. Change the numeric value 644 to 755 and click the  
‘Ok’ button.

– Open a browser to: [http://www.mysite.com/hellworld/say/hello](http://www.mysite.com/hellworld/say/hello) [ALL  
LOWERCASE]

Say#hello

Find me in app/views/say/hello.rhtml

* * *

CONGRATULATIONS! You’ve done it.

For reference, I’ve uploaded a copy of the helloworld\_godaddy  
directory to:

> **[helloworld\_godaddy](http://www.mediafire.com/?9pz114mjed1)**
>
> MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.

In case these instructions don’t work for you, here are some  
instructions that helped me along my journey:

[http://blog.mcmoyer.com/2007/9/14/running-rails-on-godaddy-a-k-a-how-do-you-keep-a-geek-entertained](http://blog.mcmoyer.com/2007/9/14/running-rails-on-godaddy-a-k-a-how-do-you-keep-a-geek-entertained)  
[http://www.ruby-forum.com/topic/104823](http://www.ruby-forum.com/topic/104823)  
[http://www.ruby-forum.com/topic/133394](http://www.ruby-forum.com/topic/133394)

> **[Setting up Ruby on Rails with GoDaddy - Online Dating Advice | Free Dating...](http://www.datingadviceguy.com/2008/01/26/setting-up-ruby-on-rails-with-godaddy/)**
>
> Steps to set up Ruby on Rails on GoDaddy hosting which can be surprisingly challenging.

[http://www.rousette.org.uk/projects/forums/viewthread/13/#487](http://www.rousette.org.uk/projects/forums/viewthread/13/#487)  
[http://lists.rubyonrails.org/pipermail/rails/2006-July/056959.html](http://lists.rubyonrails.org/pipermail/rails/2006-July/056959.html)

Hope this helps.

Bill Screen

---

<div class="post-metadata">

**Author:** ![datakix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8baadc/32.png) [@datakix](https://www.ruby-forum.com/u/datakix)\
**Post date:** [November 30, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/hosting-ruby-on-rails-on-godaddy-solved/143533/2 "2008-11-30T20:45:51Z")

</div>

Thanks for your detailed step installing rails!!!  
After following your instruction and installing 1.1.6 rails application  
I tried installing also 2.\*applications but it wasnâ€™t so easy. There was  
an error for a gem method not recognized on godaddy server and I  
discovered that the problem can be resolved replacing gem calls with the  
oldest require\_gem call. After replacing all these method in  
vendor/rails files I successfully installed my rails 2.0.5 application  
on GoDaddy.  
I wrote a page with all the steps at  
[http://rubyonrails.matteotomasini.com/deployment](http://rubyonrails.matteotomasini.com/deployment)  
I hope it will be useful for someoneâ€¦  
Thanks again  
Matteo

---

<div class="post-metadata">

**Author:** ![datakix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8baadc/32.png) [@datakix](https://www.ruby-forum.com/u/datakix)\
**Post date:** [January 30, 2009, 11:29am UTC](https://www.ruby-forum.com/t/hosting-ruby-on-rails-on-godaddy-solved/143533/3 "2009-01-30T11:29:39Z")

</div>

Hi sir I followed your post.I got a running RoR on godaddy without a  
database\>My problem when I try to add a simple query on the database my  
page only display a blank page.I really donâ€™t what happening.

deluxe hosting linux  
development machine  
win xp  
rails 1.1.6  
ruby 1.8.6  
gem 0.9.4  
mysql 5

database.yml  
development:  
adapter: mysql  
database: secondtry\_db  
host: secondtry\_db.db.3769687.hostedresource.com  
port: 3306  
username: secondtry\_db  
password: \*\*\*\*\*\*\*\*

production:  
adapter: mysql  
database: secondtry\_db  
host: secondtry\_db.db.3769687.hostedresource.com  
port: 3306  
username: secondtry\_db  
password: \*\*\*\*\*\*\*  
contoller  
@users = User.find(:all)  
app/new.rhtml  
Welcome to User Registration

Lastname  
Firstname

When I remove the query on new.rhtml  
I view the simple message â€ Welcome to User Registration and the Timeâ€

Migrate database  
def self.up  
create\_table :users do |t|  
t.column :lastname, :string  
t.column :firstname, :string  
end  
end  
Thank you in advance…

---

<div class="post-metadata">

**Author:** ![datakix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8baadc/32.png) [@datakix](https://www.ruby-forum.com/u/datakix)\
**Post date:** [January 30, 2009, 11:35am UTC](https://www.ruby-forum.com/t/hosting-ruby-on-rails-on-godaddy-solved/143533/4 "2009-01-30T11:35:15Z")

</div>

Johny ben wrote:

> Hi sir I followed your post.I got a running RoR on godaddy without a  
> database\>My problem when I try to add a simple query on the database my  
> page only display a blank page.I really donâ€™t what happening.
> 
> deluxe hosting linux  
> development machine  
> win xp  
> rails 1.1.6  
> ruby 1.8.6  
> gem 0.9.4  
> mysql 5
> 
> database.yml  
> development:  
> adapter: mysql  
> database: secondtry\_db  
> host: secondtry\_db.db.3769687.hostedresource.com  
> port: 3306  
> username: secondtry\_db  
> password: \*\*\*\*\*\*\*\*
> 
> production:  
> adapter: mysql  
> database: secondtry\_db  
> host: secondtry\_db.db.3769687.hostedresource.com  
> port: 3306  
> username: secondtry\_db  
> password: \*\*\*\*\*\*\*  
> contoller  
> @users = User.find(:all)  
> app/new.rhtml  
> Welcome to User Registration  
> \<%= Time.now %\>

\<% for user in @users %\>

\<% end %\>

| Lastname | Firstname |
| --- | --- |
| \<%=h user.lastname %\> | \<%=h user.firstname %\> |

> When I remove the query on new.rhtml  
> I view the simple message â€ Welcome to User Registration and the Timeâ€
> 
> Migrate database  
> def self.up  
> create\_table :users do |t|  
> t.column :lastname, :string  
> t.column :firstname, :string  
> end  
> end  
> Thank you in advance..  
> on Error Log  
> /web/cgi-bin/php5: Symbol `client_errors' has different size in shared object, consider re-linking /web/cgi-bin/php5: Symbol `client\_errors’ has different size in shared  
> object, consider re-linking

---

<div class="post-metadata">

**Author:** ![datakix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8baadc/32.png) [@datakix](https://www.ruby-forum.com/u/datakix)\
**Post date:** [February 4, 2009, 2:12am UTC](https://www.ruby-forum.com/t/hosting-ruby-on-rails-on-godaddy-solved/143533/5 "2009-02-04T02:12:13Z")

</div>

after one week of trial n error on deploying a very simple RoR  
application on godaddy I finally made a success.  
here my test page  
[http://catalystcreativemedia.com/webpage/](http://catalystcreativemedia.com/webpage/)

---

<div class="post-metadata">

**Author:** ![datakix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8baadc/32.png) [@datakix](https://www.ruby-forum.com/u/datakix)\
**Post date:** [June 9, 2010, 8:34am UTC](https://www.ruby-forum.com/t/hosting-ruby-on-rails-on-godaddy-solved/143533/6 "2010-06-09T08:34:35Z")

</div>

Hi, I want to launch a rails application on godaddy. I purchased a  
domain and a hosting plan. I really could not understand from where and  
how to start to deploy rails application .

Can anyone please tell how to proceed.

thank you  
aashish

---

<div class="post-metadata">

**Author:** ![datakix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8baadc/32.png) [@datakix](https://www.ruby-forum.com/u/datakix)\
**Post date:** [October 13, 2009, 3:38am UTC](https://www.ruby-forum.com/t/hosting-ruby-on-rails-on-godaddy-solved/143533/7 "2009-10-13T03:38:10Z")

</div>

Johny ben wrote:

> after one week of trial n error on deploying a very simple RoR  
> application on godaddy I finally made a success.  
> here my test page  
> [http://catalystcreativemedia.com/webpage/](http://catalystcreativemedia.com/webpage/)

I got an simple app like helloworld to work on GoDaddy. But when I try  
for using an RoR app with database connection ( almost similar to what i  
see in the above link), i am spinning wheels without any progress. Do  
you have any insight on what fixed the issue, Appreciate any help.

---

<div class="post-metadata">

**Author:** ![datakix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8baadc/32.png) [@datakix](https://www.ruby-forum.com/u/datakix)\
**Post date:** [August 28, 2010, 3:43pm UTC](https://www.ruby-forum.com/t/hosting-ruby-on-rails-on-godaddy-solved/143533/8 "2010-08-28T15:43:01Z")

</div>

Aashish K. wrote:

> Hi, I want to launch a rails application on godaddy. I purchased a  
> domain and a hosting plan. I really could not understand from where and  
> how to start to deploy rails application .
> 
> Can anyone please tell how to proceed.

GoDaddy supports Rails officially, so talk to their tech support. If  
that doesn’t work, then get your money back and use a different host.  
I’ve never heard anything good about GoDaddy’s Rails support.

BTW, a warning: don’t ever use GoDaddy’s e-mail hosting. Their spam  
filter is overactive and misconfigured, and can’t be turned off. This  
results in rejection of lots of legitimate mail.

> thank you  
> aashish

Best,  
–Â  
Marnen Laibow-Koser

> **[marnen.org: Homepage of Marnen Laibow-Koser](https://marnen.org/)**

[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

Sent from my iPhone

---

<div class="post-metadata">

**Author:** ![datakix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8baadc/32.png) [@datakix](https://www.ruby-forum.com/u/datakix)\
**Post date:** [August 28, 2010, 2:29pm UTC](https://www.ruby-forum.com/t/hosting-ruby-on-rails-on-godaddy-solved/143533/9 "2010-08-28T14:29:02Z")

</div>

Aashish K. wrote:

> Hi, I want to launch a rails application on godaddy. I purchased a  
> domain and a hosting plan. I really could not understand from where and  
> how to start to deploy rails application .
> 
> Can anyone please tell how to proceed.
> 
> thank you  
> aashish

I think this article can help you solve your issues …

[http://www.bigbluebrains.com/index.php/2010/08/04/how-to-host-a-ruby-application-on-godaddy/](http://www.bigbluebrains.com/index.php/2010/08/04/how-to-host-a-ruby-application-on-godaddy/)

Thanks  
Hamaky

---

<div class="post-metadata">

**Author:** ![datakix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8baadc/32.png) [@datakix](https://www.ruby-forum.com/u/datakix)\
**Post date:** [February 10, 2011, 4:39am UTC](https://www.ruby-forum.com/t/hosting-ruby-on-rails-on-godaddy-solved/143533/10 "2011-02-10T04:39:12Z")

</div>

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