This past fall I began researching web frameworks for an application we’re working on. I spent a couple of months casually researching and trying out every option from Pylons, to Django, to ASP.Net, to Struts, to Ruby on Rails. In the end I settled on using Ruby on Rails, not out of any technical superiority of the framework or language, but because of the great training materials available and the community momentum behind it. Starting in November, I began studying Ruby on Rails in earnest and shortly thereafter began preliminary work on our new project. Along the way, I have tried a lot of different tools and techniques for using and learning Rails. Somethings have been really helpful, other things not so much. What follows is a quick itemization of the things I have found to be most valuable and the things that I wouldn’t recommend other newcomers waster their time on.

Stuff that works

Books

There’s a lot of folks proclaiming the death of technical books these days, however I’m somewhat of traditional in my learning style. I like to study material in books and find that a well-written technical book can provide depth of exploration unmatched in blogs. My “must have” Rails reading list, organized in recommended reading order, is:

Agile Development With Rails, 3rd edition

No surprise here. This is a great book to start learning Rails and web development in general. The first half of the book is an excellent introductory tutorial, the second half is a reference.

The Rails Way

Again, not a huge surprise. This book dives much deeper into the philosophy of the framework and covers every aspect in great detail. After you get done with the Agile Web Development book and need a deeper explanation of a specific feature of the framework, look here.

Rails Up And Running

A great fast-paced advanced tutorial showing off some AJAX features and a taste of testing.

The Ruby Programming Language

I know it feels weird to put a book on the Ruby language so far down the list. Should you read up on the language first? Maybe, but I found it more compelling to be enticed by the Rails framework and then discover more Ruby as the needs arose.

I’ve purchased and read several other books, but wouldn’t recommend them. The four books listed above cover a lot of ground offering both tutorials and reference material.

Videos

My second favorite way of learning is watching video tutorials and following along. For me watching a tutorial video and working through the exercises at the same time requires two monitors, 1 for the video and 1 for the text editor & terminal window that are required to work with Rails.

Peep Code

PeepCode is a site that offers a variety of tutorial videos on Rails development. Each video sells for $9 and is roughly an hour long. The video screencasts are supremely produced with clear instructions, good insights, and great features like watermarks of the keyboard shortcuts displayed in the upper-right corner and table of contents embedded in the Quicktime file so you can easily navigate through specific points in the tutorial. I bought the subscription which provides access to all the videos for a year, it is easily the best bang-for-the-buck investment I’ve made, can’t recommend it enough.

Railscasts

Another great tutorial resource, these screencasts are narrower in focus than PeepCode and free. If you are stuck on a particular problem or aspect of the framework, check for a targeted tutorial on Railscasts.

Tools

I’m a tools whore, I love Eclipse, Netbeans, and IntelliJ for Java work. I live in Visual Studio for my .Net development. When working in Python, I prefer WingIDE. And I deeply long for a day when something as slick exists for Rails development, but I personally think there’s nothing on the market to scratch that itch even in 2009.

I have tried Netbeans, Aptana (RadRails), 3rdRail, and the RubyMine preview. They all fall flat compared to IDE’s for statically-typed languages, which I fear is just the nature of the beast for dynamic languages (although WingIDE really rocks for Python work). Furthermore, the community seems to prefer lightweight editors and therefore all the nifty support plugins seem to cater to editors, particularly TextMate. Therefore, for Rails development on the Mac, I’d say the best option is:

TextMate

If you don’t have a deep connection with another editor like Emacs or Vim, I’d recommend going with the flow and just grab a copy of TextMate. It’s a great editor, but more importantly there’s a lot of support from the community in the form of plugins and bundles.

GetBundles

The first bundle you should install into TextMate is GetBundles (notice this is the plural name, not the older GetBundle plugin). This plugin makes it easier to find and install TextMate bundles without a lot of Googling and then svn installation. To install the plugin, get into the terminal and execute these commands

cd ~/Library/Application\ Support/TextMate/Bundles
svn co http://svn.textmate.org/trunk/Review/Bundles/GetBundles.tmbundle/

Once that’s done, reload your bundles in Textmate and you can use GetBundles from the Bundle menu to install all your bundles without having to resort to the commandline again.

Project Plus Plugin

Project Plus adds some cool project managing features to Textmate, but the main reason I use it is because it replaces the sliding drawer with a more pleasing side pane (like a project explorer in most IDE’s).

Ruby Shoulda Bundle

This Textmate bundle offers more macros for Rails development with support for the excellent Shoulda gem from Thoughtbot. Search for this bundle in Textmate using GetBundles.

ZenTest

A great Ruby gem, ZenTest gives you autotest which will re-run relevant test in your project any time you save a file. The PeepCode TDD screencast explains how to setup and use autotest.

GrowlGlue

A gem that makes it easy to get Growl notifications from autotest results. When I’m using my laptop screen, this is a great screen real estate saver. I can keep a terminal window with autotest running minimized and edit in a maximized Textmate window. Each time I edit a test or code file, the Growl notification informs whether the tests are still passing or if I broke something.

Stuff that doesn’t work so well

ThoughtBot Training

I feel like a heretic for this, but I honestly feel like the money I spent on a two-day course at Thoughtbot wasn’t worth it. To be clear, the guys at Thoughtbot are great and very knowledgeable, but the course is very basic. If you can work your way through a couple of books, it’s unlikely that you will get $1200 worth of training at Thoughtbot. In our session, we spent the first 1-1/2 days covering basic Ruby, a little on views, and controllers/routing. In the last couple of hours they had to blast through ActiveRecord and models with know time to stop for demonstrations or lab work. Sadly, it we were supposed to get a chance to show some of our own project code to the instructors during those last few hours but there was no time.

Obviously, YMMV, a lot of folks seem to really like the Thoughbot Training so I would encourage you to check out the site and possibly contact Dan at Thoughtbot prior to the class to see if would be a good fit for you. Regardless, I’d strongly urge you to spend 10% of the cost on a Peep Code subscription first and see if that doesn’t satisfy your hunger.

Parting thoughts

I started writing this post almost two months ago (Feb 2009), shortly after taking the Thoughbot class. Since then, I’ve actually had to turn most of my focus back to desktop development so I’m not actively pursuing Rails development today. I’m sure over the coming year I’ll have another need to do some Rails work and it will be interesting to see how much the landscape changes in that interval.