views:

732

answers:

3

I'm running ruby on rails v2.2.2 and when I run rake gems I get this error.

$ rake gems --trace
- [I] settingslogic
rake aborted!
You have a nil object when you didn't expect it!
The error occured while evaluating nil.dependencies

/vendor/rails/railities/lib/rails/gem_dependency.rb:77:in `dependencies'

A: 

Could be a problem with a gem it's trying to load, or your setup of required gems. Check config/environment.rb for any odd-looking config.gem lines, and do an update of all your gems (sudo gem update).

Luke
+3  A: 

I figured out what was going on. There is a bug in the core rake gems function where it assumed there were specifications for the gem and would error out when it didn't exist for that gem.

Here is the ticket for this issue with a working patch http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1464

Vizjerai
A: 

There is a bit more detail here with two alternate workarounds -add one line to the dependency code in rails or -specify gem dependencies before the gem

srboisvert