Continually experimenting with new ideas and techniques — Reconstructing, Developing, Modernising.
The rails installed by cider is a rails 3 beta. As I want to play with some of the examples for rails 2 I thought I should get the most recent ruby 1.8.7 and try to use rvm’s gem sets to get myself a rails 2 world set up
brew install `brew outdated` rvm install ruby-1.8.7-p299 rvm --default ruby-1.8.7-p299
Was my first step to this, but when I tried irb this is what I saw:
ratdog:~ mike$ irb no such file to load -- map_by_method ruby-1.8.7-p299 > q
The cause of this was my ~/.irbrc which had been set up, and which has a whole bundle of useful gems added into it. Most of these are worth a post by themselves, but the suspects were:
I set up an rvm gemset and started installing gems:
rvm gemset create rails238 rvm ruby-1.8.7-p299@rails238 gem install map_by_method what_methods awesome_print net-http-spy hirb looksee wirble sketches gem install rails -v 2.3.8 rvm --default ruby-1.8.7-p299@rails238
All appeared to go well, until I tried navigating to a demo appliction and look at the environment on the default splash screen, which complained about a missing sqlite3 gem. The sqlite3 gem wanted at least ruby-1.9.1 installed, so it was time to install another Ruby.
The ruby-1.9.1-p429 had a problem with gems, but a quick trip to Yahoo! revealed this message, so it was time to install another ruby!
rvm install ruby-1.9.1-p378 rvm use ruby-1.9.1-p378 --default rvm gemset create rails238 rvm use ruby-1.9.1-p378@rails238 --default gem install map_by_method what_methods awesome_print net-http-spy hirb looksee wirble sketches gem install rails -v 2.3.8 gem install sqlite3
Now I can get to work playing with rails! The great thing is that I haven’t compromised my system Ruby, thanks to cider, rvm, and homebrew.