Wednesday, 15 April 2009

Mac Gem Jip

I'm a bit of a newbie to Macs and finally took the plunge a few months back. The day job is still on a windows box to keep inline with the rest of the team so there hasn't been much Mac playtime.

The last few days I started to put together a presentation for Agile Scotland with coded examples and that is where I hit the wall - running the code. 

Background to the problem:
About six months back I was poking at rspec and cucumber to get a feel for them. For my presentation I wanted to have the latest and greatest version of rails, rspec and cucumber available on my Mac.

When trying to run features for cucumber 0.3.0 it was expecting rspec 1.2.2 to be in place, which it was, however the rails environment had already picked up rspec 1.2.4. For the life of me I couldn't find out what where rspec 1.2.4 was being fetched. I decided to uninstall the rspec 1.2.4 leaving only one version in place and hopefully solving the problem. All looked good until you run 

gem list

and there it is, still sitting there refusing to budge no matter how many gem uninstalls are run: rspec 1.2.4

What was wrong:
After much running around the short story is there are three places gems are stored. Depending on how you install the gems affects where the gems are stored and I managed to muddle them. Thanks to Jason Tennier post which helps explains where I went astray.