Skip to content

Getting Ruby on Rails running on Bluehost

Posted on 17 March 2006

Getting my site working on Bluehost wasn't entirely straight forward but now it's running there shouldn't be any more difficulties. If you're attempting the same thing hopefully I can give you some pointers.

I have a shared server space with Bluehost and to make things a little more complicated, this domain is an 'addon domain'. Which effectively means it resides in a sub folder of my main domain.

First I had to get my domain pointing at bluehost using their DNS numbers. Once this had gone through I set up the addon domain in the cpanel.

You have to have shell access setup. Once that is granted you will be able to access the directory above public_html. It is in here you want to create your rails app. Run rails yourappname in the shell to create it.

Now I originally tried copying my application over the top and kept getting application errors saying that Rails was failing to start.

After many hours testing and debugging I traced the error down to the three cgi files in the public folder. My ftp client was disabling executable permissions on those files when I was uploading my public folder. Once I had figured this out and made the changes I was good to go.

It was important to me that this site runs straight from paulsturgess.co.uk and not from paulsturgess.co.uk/app or any sub folder like that. In order to achieve this I actually deleted my addon domain folder and created a symbolic link to it. Now my public folder in my app is the root of paulsturgess.co.uk.

Update - 29th Dec '06

I have now changed hosts to go with hostingrails.com. I found Bluehost's level of support for Rails to be poor and the reliability not good enough. They also do not offer Mongrel servers or SVN and I wanted to take advantage of Capistrano deployment.

With Bluehost my site was down and had many fast cgi errors in the crash log. I informed the support team and after a few days I was told that the reason my site was not working was because I had renamed my index.html file in the public folder. Anyone with the smallest amount of Rails knowledge would know that removing/renaming your index.html file is one of the first things you do when you start programming your app.

View the snippets archive ››

8 comments made

Rob H commented on 23 Nov 07 at 07:40

Thanks for your help. My BlueHost issues were different, simple, and I suspect common. First, it appears that you MUST use your domain name for the Rails app URL instead of your “setup” URL (IP://~user/rails). Second, any ‘puts “foo”’ comments in your controller will cause the web server to barf even though the Rails logs look fine. BlueHost let’s you see the web server error log – use them! Finally, be selective about what you copy over from your dev environment.

Overall, it was pretty easy and the demo worked fine. I highly suggest having a test site to verify your config.

Joel commented on 10 Jan 08 at 17:44

I just got set up with bluehost and now due the level of retardation from their customer support I’ll pull out of there inmediately. Firstly, after I get set up with my ssh I try to create a test Rails App on a subdomain mostly following their official “get started with ruby on rails” guide. I finish this and upon clicking the link to show the enviroment info from the familiar ruby on rails welcoming page a message displays saying “Rails application failed to start properly”. hmm, not good, well let’s make a “site” controller with a simple index action and then rename/delete /public/index.html to get rid of the rails welcomming page. So I go ahead and proceed with this and now when I try to go to dev.mysite.com I just get a page displaying Application error. Rails application failed to start proplerly.

I’m a bit confused by now so I quickly get on a live chat feature they have on their site (bluehost.com) and ask a representative some questions related to this issue. He/She says at one point, quote: ”..but we don’t really offer rails support…” Are you kidding me?! So I realize this guy is a retard and end the chat. I decide to put a support ticket instead and go to sleep. Next day in the morning I check my email and I got a reply saying that ssh had been enabled on my account. Duuuhhhh, off topic reply, not really surprising. So I once again put another ticket in and I’m still waiting for the reply after a few hours.

So, if you’re thinking about deploying your cool rails app with bluehost, you might wanna think about it twice. In any case, good luck and happy coding.

brad commented on 11 Jan 08 at 10:54

I have had similar problems with bluehost rails support: ‘rails application failed to start’, rubygems version needs update to 0.9.5. I too used bluehost tickets, forums and live chat. The response was the same from each request: our ruby support person is not available. After three weeks of waiting I moved to site5.

The lack of rails support at bluehost is really unfortunate. The offer many nice features (great cpanel, live chat, 24/7 phone support). Behind their wonderful support mechanisms there is no ruby/rails knowledge. (1/1/2008). Bluehost needs support people for ruby and rails. A good indication that this has changed would be to offer SVN and Capistrano support.

Pirkka commented on 14 Jan 08 at 05:10

I think the bottom line is that Rails & off-the-shelf minimum-cost hosting do not fix very well.

Hosting providers such as Dreamhost and Bluehost have been overtly optimistic about their ability to host and support Rails apps (which due to their nature are much more complicated beasts to host than personal home page scripts). Some hosting providers are trying their best to offer a low-cost Rails hosting, and succeeding (I’ve been happy with Hostingrails.com, and I have heard of other good options).

I’m serious about Rails stuff so for me it looks like getting my own virtual box set up is the way. At least the cost of VPS has dropped (see, for example, http://www.slicehost.com/), and on the whole virtualisation seems to be the way forward.

Even though setting up your own box has benefits, I’m still hoping that Hostingrails and other such companies can make a good business hosting RoR apps in a more “upload and run” fashion.

Paul commented on 20 Jan 08 at 05:48

Having used hostingrails for a year now I have to say they have been excellent.

They are knowledgeable, cheap, have an easy to use setup and most importantly are reliable.

The web agency I work for have now started using them for our smaller rails projects and I host several other sites using them and it’s all been smooth running.

Bet commented on 19 Nov 08 at 09:56

Glad you worked it out, I have some problems now and I am chasing errors for 2 days :(

multi table poker tournament strategy commented on 25 Apr 09 at 02:33

I’m not a Linux expert. I hope someone at support will alert me if there is a problem with doing it this way or if I should be installing it elsewhere. Why hasn’t ruby been updated to a newer version for all users? I think you should also install gem and rails for people, so their system comes more rails ready. Or at least rdoc and ruby-devel? Thanks for listening.

Tudor commented on 15 Sep 09 at 11:30

I’m trying to use Rails with Bluehost. I’ve readed all tutorials, even those from bluehost.com but no way.

If there are some people who are using bluehost / rails applications, please, make a how-to for us. (i’ll make sure you’ll have a lot of visits on that page :)) )

I’m already started to think at site5 or hostingrails.

Got something to say?

About

Paul is a Rails developer for Kyan web agency in Guildford, Surrey, UK.

More snippets

Take a look in the archive

Need a website?

Get in touch with me at my name at gmail.com or contact my employer.

Hosting

I recommend hostingrails.com

Contact

my name at gmail.com