The Best Way to Learn Ruby on Rails by a PHP Developer

One of the things I like best about working at Buckeye Interactive (BI) is the community of learning that is fostered here. We are always experimenting, tinkering, breaking, and building with the latest technologies, tools, and widgets we can find. Currently, all of the web solutions we provide for clients use PHP as the underlying language. I’ve been hearing nothing but good things about the Ruby language and more importantly Ruby on Rails (RoR). I have been contemplating making the switch on my personal projects and if you’re wondering how best to learn RoR I’ve compiled this process to go from a PHP developer to a Ruby developer. I’m no Billie Mays and won’t try to sell you on this process. This is what has worked for me and I hope it works for you.

Ruby on Rails

First, a couple of definitions. Ruby is a language, just like Python, Java or PHP. Rails is a framework that gives you a lot of functionality for free that helps you build websites (web applications) quickly and easily. A comparable PHP framework would be CakePHP or Symfony. Instead of saying Ruby on Steroids, we call it Ruby on Rails.

Step 1: Ruby Koans

In order to learn how to use Rails, I take the unconventional approach and suggest learning the language first before learning the framework. Many bloggers/developers would say I’m crazy, but I tried learning Rails first and it made the transition much more difficult. It may not be as much fun, but I think I’ve found a fun way to learn Ruby!

Enter Ruby Koans. Ruby Koans is a set of tests, or koans if you will, developed by EdgeCase here in Columbus, Ohio. EdgeCase is a web application firm specializing in Ruby development and also endorse teaching and learning like we share here at BI. I’m not endorsing Ruby Koans because it’s locally grown and operated but because it’s a internationally praised way of learning Ruby that many Ruby beginners endorse.

Ruby Koans premise is that there are set of 270+ broken tests and it is your mission to repair them. Along the way, the tests are fixed by utilizing the Ruby language, syntax and culture of Test Driven Development (TDD). Learning the culture was one of the coolest parts of the Koans. I would allot 2 weeks of playing with Ruby Koans with 1 hour per night as an average. The goal is not to speed through or skip around, but take your time and add more tests, break and fix again.

Step 2: Rails for Zombies

Rails for Zombies is an online training course for learning Rails complete with multiple screencasts and challenging levels. Rails for Zombies (RFZ) is created by Envy Labs that offers a lot of other training courses also. Some are paid courses and some, like RFZ, are free. You will be walked through the groundwork of the Rails Model-View-Controller and knowing Ruby will make this new information resonate even more. I must warn that the repetitive references to Zombies can become a little grotesque and annoying, but if you can get past that you will be moving on in no time.

There are only 5 levels and I would allot 4 hours altogether to get through the challenges.

Step 3: Learn Rails By Example

Learning Rails by Example was my first resource when I initially attempted to learn Ruby on Rails. While a moderate developer could make their way through it, I don’t recommend it.

That being said, Learn Rails by Example (LRE), is the most comprehensive book I’ve found to not only learning RoR, but learning the development process of a RoR project. LRE’s mission is to step you through building a basic version of Twitter. They will show you how to use Git for version control, Rspec for Test Driven Development (TDD), and everything else you could imagine you would need to build a RoR project for your team.

The book is available online for free, but can be downloaded for offline use for $26. This is a full-length book and I would allocate a good 2-4 weeks to get through the book. I anticipate each chapter should take around 1.5 hours to read, comprehend, digest and implement. Given 13 chapters at 1.5 hours each is nearly 20 hours. One hour per night would take nearly 3 weeks. Come on, you can do it! You’re almost done!

I didn’t promise I would show you the quickest way to learn RoR, but I do promise you will be a RoR developer after completing these steps. If you complete all of these steps and use them for future reference, I hope that you will love playing with Ruby as much as I do. Good luck!

Related Posts

Developers collaborate to launch a client-focused site successfully and efficiently.
Having an up-to-date website can be a clear contributor of success.
Life as a developer at Buckeye Innovation: Hear from our team members themselves.

Want to Connect?