Monday, April 30, 2012

undefined method `version' for nil:NilClass

The last thing I expected to see while I was upgrading ruby gems was
"undefined method `version' for nil:NilClass"
Fortunately I was not the first person to encounter this and Google pointed me in the right direction. To solve this problem run
gem install rubygems-update
and then run
Thanks to Tommy Ryan for posting his solution!

Also, while upgrading gems there seems to be some controversy surrounding recent updates to Ruby Gems that can cause conflicts with your bundle. Per The RailsApps Project:
As of release 1.8.0 (4 May 2011), the RubyGems system gem began a series of rapid updates (with controversy and a promised resolution). The example apps all work with version 1.8.15 but if you install a gem and find it doesn’t work, roll back to an older version of RubyGems: