Navigation:

Archives:

August 2014
M T W T F S S
« Dec    
 123
45678910
11121314151617
18192021222324
25262728293031

Tooling Up for Ruby on Rails – Part 3

I really should have made these two points in Part 2:

  1. Why Rails 3 and not Rails 2?
  2. Now that you’ve got Rails 3, what do you do with it?
  3. 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 …

1
$ gem install rails

… and then update sqlite by reinstalling …

1
$ gem install sqlite3-ruby

… and then verify what you got by typing …

1
$ gem list

… and you should see this …

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
*** LOCAL GEMS ***

abstract (1.0.0)
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)
bundler (1.0.7)
erubis (2.6.6)
i18n (0.5.0, 0.4.2)
mail (2.2.12)
memcache-client (1.8.5)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.6)
rails (3.0.3, 3.0.0.rc2)
railties (3.0.3, 3.0.0.rc2)
rake (0.8.7)
sqlite3-ruby (1.3.2)
text-format (1.0.0)
text-hyphen (1.0.0)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.23)

If you don’t and cannot figure out why, please ask.

See you in Part 4.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>