Started learning RoR with the help of Rails for .NET Developers. Spent well over an hour just getting through the first two pages of creating my first app. After typing in the 3rd instruction as per the book, I got errors.

C:\dev> rails book_tracker
C:\dev> CD book_tracker
C:\dev> ruby script/generate scaffold book title:string author:string on_loan:boolean
  wrong constant name Title:stringController

Fine, I’ll google. Via Google the Ruby community tells me that I have an old version of Rails and need to upgrade – while Mac OS X comes with Ruby and Rails pre-installed, it’s not exactly the latest version.

I update Ruby and I update Rails and still I get the error. I uninstall and reinstall rails, confirm that I have the right version, reboot the computer, and still I get the error.

Back to Google. Perhaps I somehow still have the old version somewhere. I google for “multiple versions of rails” and find a brief blog post about Using Multiple Versions Of Rails that gives me this useful piece of information:

your individual rails projects store the version number they expect

Aha! I performed steps 1 and 2 of the tutorial before upgrading Rails, so step 3 was still hitting the old version rather than the new version. I delete the entire folder, redo steps 1 2 and 3 and bingo, it works.

Over an hour to perform a 5-minute task. Couldn’t rails -v report all versions of rails that I have, rather than just the topmost one in the list?