While trying to pick a consulting company to work with, people occasionally ask us about the differences between PHP and Ruby on Rails. Here are my thoughts on the matter. Please feel free to add to this list in the comments.
PHP is a programming language, whereas Rails is a framework for writing web applications using the Ruby programming language. So right off the bat this is not an apples-to-apples comparison.
Ruby is a very succinct language. This means that you can be very expressive and do a lot in very few lines of code. PHP is very well known, so it might be easier for many people not familiar with Ruby to stay with PHP.
PHP programs tend to require less memory to run so they tend to be easier to deploy. With the release of mod_rails (Phusion Passenger) and Ruby Enterprise Edition Rails becomes easier to deploy than PHP once the initial Apache add-ons are made.
They are both equally easy or difficult to scale. The first level of scaling is just adding more memory/cpu/server instances. When scaling thusly they are both just as easy. Once this level of scaling is exhausted, they are both equally hard requiring all of the same methods as scaling any other web application on the internet: Code optimizations, caching, more servers, database scaling, content delivery networks and more.
Rails is cooler. Sorry, but it’s true. Don’t worry though, eventually there will be something even cooler than Rails and then I’ll write an article comparing that to PHP or Rails.
I’m sure there are exceptions to this, but in general the results of using Rails (final product) will be heads and shoulders (probably even arms and legs) above the results by someone who wrote their own web application framework.
The following would be true of any MVC framework (like Rails) worth anything, regardless of language:
Things Rails does for you that seem to be specific to Rails (I would assume that somewhere there is another web application framework that does some or all of these things, but I am not aware of one).
Picking one over the other has more to do with who you trust to build your application for you and what they like. Or if you are a developer, find out which one best fits your tastes and temperament. Neither will save you from bad code or bad decisions or misunderstanding but for me Rails feels like home. Find something that feels like home and then go write something that users will love.
Here are a few things we’ve written using Rails: Less Accounting (web based accounting software) and Less Projects (project task tracking) (online project tracking)
If you wanted it to build a product you’d find a way to get time to work on it. If you really wanted to start that new hobby you’d sacrifice something to find the time and money to do it.
I'll define a "Wannabe Entrepreneur" as someone who has never made money from their businesses. Here are the different types of wannabes.
In the past few years I've built go-carts, built a 200+ sq ft workshop, written several eBooks. How do I create a life where I have time to work on side projects?
Receive 5 Software projects mistakes we have made over the years and how to avoid them.