Error with Gem Outdated command

(realized this should have been posted here, not the Rails group…)

Trying to run ‘gem outdated’ on OS X (10.6.3) and I’m getting:

sudo gem outdated
ERROR: While executing gem … (NoMethodError)
undefined method `first’ for nil:NilClass

Here’s my info:

john$ gem env
RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.7
  • RUBY VERSION: 1.8.7 (2009-06-08 patchlevel 173)
    [universal-darwin10.0]
  • INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
  • RUBY EXECUTABLE:
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  • EXECUTABLE DIRECTORY: /usr/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • universal-darwin-10
  • GEM PATHS:
    • /Library/Ruby/Gems/1.8
    • /Users/john/.gem/ruby/1.8

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8

  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:

More info:

gem outdated -V
GET http://rubygems.org/latest_specs.4.8.gz
302 Found
GET http://production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
ERROR: While executing gem … (NoMethodError)
undefined method `first’ for nil:NilClass

john$ gem outdated --backtrace
ERROR: While executing gem … (NoMethodError)
undefined method first' for nil:NilClass /Library/Ruby/Site/1.8/rubygems/commands/outdated_command.rb:26:in execute’
/Library/Ruby/Site/1.8/rubygems/commands/outdated_command.rb:21:in
each' /Library/Ruby/Site/1.8/rubygems/commands/outdated_command.rb:21:in execute’
/Library/Ruby/Site/1.8/rubygems/command.rb:270:in invoke' /Library/Ruby/Site/1.8/rubygems/command_manager.rb:134:in process_args’
/Library/Ruby/Site/1.8/rubygems/command_manager.rb:104:in run' /Library/Ruby/Site/1.8/rubygems/gem_runner.rb:58:in run’
/usr/bin/gem:21

Doing a ‘sudo gem update’ does work fine (it just updated a couple
fine).

Anyone? Thanks.

John T. wrote:

(realized this should have been posted here, not the Rails group…)

Trying to run ‘gem outdated’ on OS X (10.6.3) and I’m getting:

Not one to bump topics, but I’m still getting this error… and it’s been
2 months…

Thanks

John T. wrote:
Trying to run ‘gem outdated’ on OS X (10.6.3) and I’m getting:

sudo gem outdated
ERROR: While executing gem … (NoMethodError)
undefined method `first’ for nil:NilClass

Here’s my info:

john$ gem env
RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.7
  • RUBY VERSION: 1.8.7 (2009-06-08 patchlevel 173)
    [universal-darwin10.0]
  • INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
  • RUBY EXECUTABLE:
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  • EXECUTABLE DIRECTORY: /usr/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • universal-darwin-10
  • GEM PATHS:
    • /Library/Ruby/Gems/1.8
    • /Users/john/.gem/ruby/1.8

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8

  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:

More info:

gem outdated -V
GET http://rubygems.org/latest_specs.4.8.gz
302 Found
GET http://production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
ERROR: While executing gem … (NoMethodError)
undefined method `first’ for nil:NilClass

john$ gem outdated --backtrace
ERROR: While executing gem … (NoMethodError)
undefined method first' for nil:NilClass /Library/Ruby/Site/1.8/rubygems/commands/outdated_command.rb:26:in execute’
/Library/Ruby/Site/1.8/rubygems/commands/outdated_command.rb:21:in
each' /Library/Ruby/Site/1.8/rubygems/commands/outdated_command.rb:21:in execute’
/Library/Ruby/Site/1.8/rubygems/command.rb:270:in invoke' /Library/Ruby/Site/1.8/rubygems/command_manager.rb:134:in process_args’
/Library/Ruby/Site/1.8/rubygems/command_manager.rb:104:in run' /Library/Ruby/Site/1.8/rubygems/gem_runner.rb:58:in run’
/usr/bin/gem:21

Doing a ‘sudo gem update’ does work fine (it just updated a couple
fine).

Anyone? Thanks.

I’m getting the same error from gem outdated.

$ gem outdated -V --backtrace
GET http://rubygems.org/latest_specs.4.8.gz
302 Found
GET http://production.s3.rubygems.org/latest_specs.4.8.gz
304 Not Modified
acts_as_commentable (3.0.0 < 3.0.1)
authlogic (2.1.3 < 2.1.6)
aws (2.3.32 < 2.3.34)
bcrypt-ruby (2.1.3 < 2.1.4)
bluecloth (2.0.7 < 2.0.9)
bson (1.1 < 1.1.5)
bson_ext (1.1 < 1.1.5)
builder (2.1.2 < 3.0.0)
business_time (0.3.0 < 0.3.1)
capybara (0.3.9 < 0.4.0)
childprocess (0.1.4 < 0.1.6)
coderay (0.9.3 < 0.9.6)
culerity (0.2.13 < 0.2.14)
database_cleaner (0.5.2 < 0.6.0)
ERROR: While executing gem … (NoMethodError)
undefined method first' for nil:NilClass /usr/local/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/commands/outdated_command.rb:26:in execute’
/usr/local/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/commands/outdated_command.rb:21:in
each' /usr/local/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/commands/outdated_command.rb:21:in execute’
/usr/local/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/command.rb:278:in
invoke' /usr/local/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:134:in process_args’
/usr/local/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:104:in
run' /usr/local/ruby-enterprise-1.8.7-2010.01/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:63:in run’
/usr/local/ruby-enterprise-1.8.7-2010.01/bin/gem:21

$ gem env
RubyGems Environment:

  • RUBYGEMS VERSION: 1.4.2
  • RUBY VERSION: 1.8.7 (2009-12-24 patchlevel 248) [i686-linux]
  • INSTALLATION DIRECTORY:
    /usr/local/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
  • RUBY EXECUTABLE: /usr/local/ruby-enterprise-1.8.7-2010.01/bin/ruby
  • EXECUTABLE DIRECTORY: /usr/local/ruby-enterprise-1.8.7-2010.01/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-linux
  • GEM PATHS:
    • /usr/local/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
    • /home/donp/.gem/ruby/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
    • “gem” => “–no-ri --no-rdoc”
    • :sources => [“http://rubygems.org”]
  • REMOTE SOURCES:

a little more information about the gem outdated problem, by adding a
couple print lines to outdated_command.rb, its the devise gem thats
failing.

<Gem::Dependency type=:runtime name=“devise” requirements=">= 1.2.rc">

  dep = Gem::Dependency.new local.name, ">= #{local.version}"
  puts dep.inspect
  remotes = Gem::SpecFetcher.fetcher.fetch dep
  remote = remotes.last.first

undefined method `first’ for nil:NilClass

Perhaps the SpecFetcher doesnt know what to do with 1.2.rc.

Don