I really should have made these two points in Part 2:
- Why Rails 3 and not Rails 2?
- Now that you’ve got Rails 3, what do you do with it?
- How do you get to the latest version of Rails which is NOT 3.0.0?
First, beside my desire to “lead the target” so I can be ready with the skills I need when I am ready to apply those skills in the marketplace, there are some significant technical reasons for going to Rails 3 despite the fact the a big chunk of today’s real world jobs are probably still using Rails 2.3 or even earlier.
Most of these stem from the core intentions of the Rails 3 release – to merge the best features of MERB back into Rails to create a single unified framework. MERB was introduced in late 2008 and quickly developed a following as the leaner, faster, more modular, and more scalable alternative to Rails. Despite the inevitable conflicts and flame-wars that ensued, and to their very great credit, the leaders of both communities resisted the urge to join in on this ideological cat-fight and developed a plan to merge the frameworks.
Rails 3 is much more modular than Rails 2 and far more agnostic about most of it’s components. If I want to play with JQTouch so I can project my RoR application onto mobile devices (and I do – thanks, Doug for the 411), I’m not locked out by Prototype and script.aculo.us. If I want to try a different testing framework or different ORM (Object-Relational Mapping) software, I can. Since any particular job or business opportunity may demand the use of components outside the default RoR set, it is to by benefit to know how these can be plugged into RoR applications.
Besides, all the new, fun, stuff is going to be happening in Rails 3, not Rails 2.
Second, here’s what NOT to do – try learn Rails 3 using a Rails 2 book.
They’ve changes some of the idioms, so if you learn too many 2-isms, you’ll miss out on some of the new magic. Besides, even at the most basic starting level, many of the techniques and commands are changed. You know those starting blocks that the nail to the track so a sprinter push off to a strong start? Learning Rails 2 lessons using Rails 3 is like pulling the nails before the starting gun is fired – you push off and land flat on your face.
Make sure your book or on-line tutorial is for Rails 3. Doug suggested the DevChix Curriculum as a starting point. When you find other good ones, please share them in a comment to this post.
Unfortunately, this applies to a lot of the podcasts (Railscasts, Peepcode, and others). There’s a lot of good content out there (and for an auditory learner like me – it’s a Godsend), a lot of it is free, but much of it predates Rails 3 and could lead you astray. What I am doing is getting up to speed on my 3-isms, taking the best concepts from the material as I find it, and ignoring the stale details when I recognize them as such.
Third, if you’ve worked through Part 1 and Part 2, you have Rails 3.0.0 installed. Rails 3.0.3 is the latest stable release. To update to this, and future releases (until some future tectonic shift changes everything), just type …
$ gem install rails
… and then update sqlite by reinstalling …
$ gem install sqlite3-ruby
… and then verify what you got by typing …
$ gem list
… and you should see this …
*** LOCAL GEMS ***
actionmailer (3.0.3, 3.0.0.rc2)
actionpack (3.0.3, 3.0.0.rc2)
activemodel (3.0.3, 3.0.0.rc2)
activerecord (3.0.3, 3.0.0.rc2)
activeresource (3.0.3, 3.0.0.rc2)
activesupport (3.0.3, 3.0.0.rc2)
arel (2.0.6, 1.0.0.rc1)
builder (3.0.0, 2.1.2)
i18n (0.5.0, 0.4.2)
rails (3.0.3, 3.0.0.rc2)
railties (3.0.3, 3.0.0.rc2)
If you don’t and cannot figure out why, please ask.
See you in Part 4.