ADVERTISEMENT

Can someone explain the true landscape of Rails vs PHP deployment, particularly within the context of Reseller-based web hosting (e.g., Hostgator)?

Although Rails hosting will probably never be as inexpensive as PHP, since the infrastructure requirements are always higher, it is not expensive to host a Rails site.

It does take a certain amount of technical skill to properly deploy a Linux-based server and load on Rails and all the associated database back-end stuff, but this is not an insurmountable obstacle. Any competent programmer could probably get up to speed inside of a few weeks with just a few hours a day and a good reference book. This is the sort of thing that is valuable to know anyway as it helps you tune your deployment environment.

Many "out of the box" Rails hosting systems are expensive. EngineYard, Joyent and Heroku are great examples of that, but in every case they do carry a premium over the self-hosted alternative.

If you have a client that can afford this premium, it's worth taking advantage of their expertise. If you're on a very tight budget, you may not be able to justify this.

The lest expensive Rails hosting solution I know of that works is using Linode with a standard distribution combined with Passenger. With some basic tuning, nothing especially difficult, you can host a small to medium scale site on even their most inexpensive offering. A machine with 512MB of memory can typically host two to three lightly loaded Rails sites or one busy one. By lightly loaded I mean hundreds of visitors per day. Busy is thousands to tends of thousands.

In fact, I have had so much trouble with shared PHP hosting that it's not worth the cost savings to do it that way. Instead I have several VPS systems on Linode that are specifically for PHP hosting, WordPress blogs, typically, and they perform very well. Although you might find it a nuisance that you have to go in and patch the machines once in a while, at least you can schedule that and anticipate potential problems instead of being at the mercy of your provider.

Commodity hosting companies will often break things accidentally and getting service restored can be a time-consuming process of trouble tickets and phone calls.

Deployment of any application, Rails or otherwise, is all about workflow. Many Ruby-oriented tools like Capistrano and Chef can make managing applications much easier than a manual approach.

My take on Rails: It can be a bit more expensive, but it's a lot easier to manage once you get used to the tools and automate your workflow.


Not an answer to your question, but to be very honest, my initial impulse when I read about your business setup was: "Why is he not just sticking with PHP?"

Don't get me wrong: I'm sure Ruby is a beautiful language, and Rails a great framework and much of it is in many ways superior to PHP. It's also great for a developer to explore new fields etc. etc.

But from a purely business perspective, PHP is arguably "where it's at" for three important things at the moment:

  • Cheap hosting, and

  • CMS software for every taste, size, skill level and requirement and favourite colour. Some of them are even half-way usable, and

  • Affordable developers, some of them even half-way capable.

So if I were you, I would look into whether your requirements can be fulfilled with PHP first.

Otherwise, +1 for asking a very thoughtful question, and it's going to be interesting to see the results. I have seen affordable rails hosting but it's few and far between.


I have found a very good rails shared host: webfaction. I am very pleased with it. Check it out! The prices are amazingly low, they offer one-click installers for rails, the number of sites you can host is unlimited. Their highest supported rails-version is 3.0.5!!! :) You have ssh access to your share, so you have full control, you can deploy using capistrano, or do stuff by hand on the server. Really awesome.

Their documentation is really good, and they have a very active support-forum, for all other questions.