Rails is just a framework for web development, written in Ruby. Unlike PHP, Ruby isn’t specifically designed for web development (it’s more general purpose), so when developing website using Ruby, you need a foundation on which to build your site. You can write this foundation yourself, or you can use an existing foundation in the form of a Ruby-based web server, or a complete web development framework. Rails is a quite an elaborate framework, which is quite opinionated in its design. Im yet warm to it, as some of my own opinions (I’m a bit of a purist of simplicity) conflict with those of Rails.
Sinatra is a good alternative. It’s much lighter, and gives you a lot more freedom to make your own design choices. How much quicker Rails or Sinatra makes developing your website, compared to PHP and its associated frameworks, depends on the site your building, though generally speaking, an experienced Ruby developer could churn out something faster and probably more maintainable than an experienced PHP developer.
Ruby is a much more expressive language, and seems to have had much more thought put into than PHP. Everything in Ruby serves a purpose, and how it all fits together is really nice. This is in contrast to PHP which has gone through massive evolutionary changes since its inception, and as a result has naturally turned out like a ball of mud in comparison to Ruby. Ironically, I find Ruby much more of a pleasure to write websites in, than PHP - a language specifically designed for web development, hence the irony. PHP probably owes its success to it’s simplicity, in the sense that PHP is easy to grasp as it uses simpler, more familiar constructs. There’s also less setup required to get going with PHP, so it’s well suited to anyone who just wants to get their feet wet in the area of web development. Ruby has a higher learning curve, but you get quite a lot for it. Once you’ve mastered Ruby, you’ll probably find it simpler to work with than PHP.
I’m saying this as someone who began web development using PHP5 roughly 4 years ago. I’ve only really started to get into Ruby in the last 6 months. I learnt ruby first, then decided to venture into Rails. I abandoned learning rails though, as it didn’t fit my style of development; it came close, and I really wanted to like it, but ultimately it was too opinionated, and had a learning curve which I felt was greater than necessary.
I hope that’s helped someone
I wrote this with a full-blown conversation in the background, so forgive me if some sentences don’t make any sense.