Cloud Zone is brought to you in partnership with:

Andy is a freelance journalist based in Coventry, United Kingdom. He also codes web applications. Andy is a DZone MVB and is not an employee of DZone and has posted 25 posts at DZone. You can read more from them at their website. View Full User Profile

Rails Hosting Options

02.13.2013
| 2895 views |
  • submit to reddit

I’ve been considering the options for hosting my new Ruby on Rails web app. What follows is some thoughts on those options.

I should mention:

I’m not an affiliate for any of the below mentioned companies

Here are the services I tried:

Rails Hosting Services

Please note: this is a list of the services I’ve tried. It’s not meant to be a list of all the possible options, there are quite a few more than this.

I didn’t choose the above list by accident either. For example, I wanted to be sure and try a VPS, likewise for a Paas, as well as another regular shared hosting services that claim to have support for Rails.

I have a new version of my site (nearly) built using Rails that I could launch. It doesn’t contain anything too strenuous in terms of gem requirements or configuration options. However, what it does contain has to stay. In other words, I’m not going to compromise the features of my app, just because my chosen host can’t handle some aspect of it.

Right, here we go…

HostGator Rails Hosting

HostGator are excellent at customer support, and use a great build of cpanel for administering your site.

They only have support for Ruby 1.8.7, although I think there are now options to improve on that. It requires a lot of fiddling about though, and I decided that one of the prerequisites for my decision had to be a limited requirement for system administration.

Also, HostGator are driven by whatever is going on with cpanel. That’s completely reasonable, and probably rules them out for serious Rails hosting.

I’d have no problem recommending HostGator as an excellent, low cost web host – for anything but Rails. You could always buy a VPS from them too.

Dreamhost Rails Hosting

I’ll say from the start, these guys are very close. Their pricing is good, there admin panel is marvellous, and you can get shell access to install RVM.

There is one big problem though. If you choose RVM, you’ll have to use FCGI. Or, alternatively, you can use Passenger, but then you have to use Ruby 1.8.7.

I get the feeling that Rails is just too demanding in terms of all the services/configuration/gems that it needs to be successful on a shared host.

Like HostGator, I’d have no problem recommending Dreamhost for good quality, low cost web hosting – apart from for Rails. They are close though, probably closer than most other hosts of a similar nature.

Linode Rails Hosting

Linode offer VPS hosting. That means you get (for example) a full Ubuntu server ready to be set up the way you like it. I’ve only got good things to say about Linode. It’s brilliant, and inexpensive too.

Also, to get a Rails setup that matches your development environment exactly, Linode offers a way to do it.

There is an important caveat though.

You really have to know what you’re doing with regard to system administration. There is an awful lot of command line/shell stuff to do – obviously, it’s a vanilla server after all.

I set mine up so that I could deploy via Capistrano, and I had RVM installed too. But, and this is important, I’m still learning Rails. So fighting with all the sys admin stuff I’m not sure about, was just a bridge too far.

That is not the fault of Linode.

I just don’t know enough about Linux sys admin to get the most out of running a VPS. Things like setting up email accounts, and hosting multiple domains, was just beyond me. Or put another way, more hassle than I had time for.

Heroku Rails Hosting

Heroku is a Paas (Platform as a Service) that was originally intended to run rack apps. And it shows. There is zero configuration required, and the integration between your local development environment is almost seamless.

You can run multiple apps, and it’s easy to assign your own domain names to an app. That answered my email problem too. I use 123-reg for all my domain names. You can point a domain name to your Heroku app just by adding a CNAME record. That means I can host email with 123-reg.

Heroku does offer some challenges. There is no file system, so I’ve found the best way is to store assets on Amazon S3.

It also insists on you using Postgresql. It’s great, but there is a learning curve if you’ve not used it before.

There is a free account available, but to get any kind of performance, you are going to have to use at least one web dyno. That’s going to cost you around $35 a month.

However, it might just be worth it, because as I said before, you have zero sys admin to do. Build your app, deploy it, job done. Oh, and deployment is done via a Git commit. Easy.

Finally…

So I’m using Heroku. It is pricey, but the hassle free approach is what sold it for me. And you can try it on a free account first, to see if it suits you.

The others I noted here have potential, in Linode’s case a real choice in fact (if you have the right skills), but Heroku has the edge because you can just focus on code.

I recon when I’m more competent with Rails itself, I will probably return to the Linode option for ultimate flexibility.

 

Published at DZone with permission of Andy Hawthorne, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)