Another Rails Project

May 14, 2013

It is May of 2013. I went through the excellent rails tutorial by Michael Hartl late last year with the intention of getting up enough momentum to do another rails project, and now I am finally getting around to it. My intent now is to breeze through the tutorial, ignoring all of the test driven development stuff, and taking lots of shortcuts so I can just get on the air quickly with what I really want to do. I do intend to use git, but not on Heroku, I'll just put my repository on a server of my own.

Rails development environment, IDE's and such

I spent some time looking into rails IDE's. I have just finished a Java project for android and used Eclipse and said many times that some things, in particular the navigation bar at the left side of the eclipse screen would be ideal for rails. That coupled with a single button to run the application and things would be very nice. It turns out that a rails mode for eclipse was started and abandoned years ago. There are IDE's out there, but mostly commercial, and I insist on using my own editor (vim). There are vim add-ons to aid rails work, and I am looking into them, but getting a bit distracted by the whole process of learning new vim tricks. So I am back to my scheme of using a set of buttons with xfce to get me close to what I want.

Rails versions, packages, gems

For any rails project, it has always been crucial to sort out version issues: The ruby version is less of an issue than it once was now that 1.9 has become mainstream. There was a long period when 1.8 and 1.9 were installed side by side on many systems and a thing called "rvm" (the ruby version manager) was an aid to dealing with the insanity, but these days and the need for rvm seem to have passed.

Dealing with gems (and rails is a gem) is more of an issue. Fedora packages many gems and makes them available via yum, but definitely lags behind the gem world (for example, at the time of this writing the rails gem available via yum is 3.2.8 and the rails gem that the gem package system offers is 3.2.13). You might say that all of this only matters if you insist on having the latest version, and you might be right. The real question arises when you want the latest version of some package that you can only get via the gem subsystem and have all your packages installed via yum.

I thought it would be a good idea to update my gems, so:

gem update
This is taking me to rails 3.2.13, as well as updating virtually every gem I used in my past run through the rails tutorial. On the other hand, when I type "rails -v", I get:
rails -v
Rails 4.0.0.rc1
This version number is confusing and misleading. It is actually the version number of the railties gem (which is the new core component of rails). The actual version of rails itself is 3.2.13 (although 3.2.8 is still on my system). Note that gem is putting lots of stuff into my ~/bin, including a rails script (which overwrote my own rails script I had there).

Game over

Got torn away by something else, never to return.
Feedback? Questions? Drop me a line!

Ruby on Rails notes / tom@mmto.org