`<': comparison of Gem::Version with nil failed (ArgumentError)
Closed this issue · 4 comments
Hello,
I did like explained in the documentation:
$ gem install bundle_outdated
$ gem update --system 1.6.0
$ bundle-outdated
Finding outdated gems..
/Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/gem_dependency.rb:40:in `<': comparison of Gem::Version with nil failed (ArgumentError)
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/gem_dependency.rb:40:in `outdated?'
from /Users/zedtux/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `to_proc'
from /Users/zedtux/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `find_all'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:in `each'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:in `find_all'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:in `outdated_gems'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:8:in `search!'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated.rb:7:in `search!'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/bin/bundle-outdated:23
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/bin/bundle-outdated:19:in `load'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/bin/bundle-outdated:19
I've added at line 34 of the file lib/bundle_outdated/gem_dependency.rb the line
puts "latest_version_for(#{name}): #{Gem.latest_version_for(name)}"
Then I got this output:
$ bundle-outdated
Finding outdated gems..
latest_version_for(bundler): 1.0.13
latest_version_for(rake): 0.8.7
latest_version_for(activesupport): 3.0.7
latest_version_for(activerecord): 3.0.7
latest_version_for(actionpack): 3.0.7
latest_version_for(actionmailer): 3.0.7
latest_version_for(activeresource): 3.0.7
latest_version_for(rails): 3.0.7
latest_version_for(rmagick): 2.13.1
latest_version_for(uuid): 2.3.2
latest_version_for(ruby-ole): 1.2.11.1
latest_version_for(rjb): 1.3.4
latest_version_for(RedCloth): 4.2.7
latest_version_for(thinking-sphinx): 2.0.3
latest_version_for(haml): 3.1.1
latest_version_for(paperclip): 2.3.11
latest_version_for(will_paginate): 2.3.15
latest_version_for(datanoise-actionwebservice):
/Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/gem_dependency.rb:40:in `<': comparison of Gem::Version with nil failed (ArgumentError)
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/gem_dependency.rb:40:in `outdated?'
from /Users/zedtux/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `to_proc'
from /Users/zedtux/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `find_all'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:in `each'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:in `find_all'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:in `outdated_gems'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:8:in `search!'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated.rb:7:in `search!'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/bin/bundle-outdated:23
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/bin/bundle-outdated:19:in `load'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/bin/bundle-outdated:19
Hi!
Could you paste the relevant parts of your Gemfile?
Thanks,
Patrick
On May 6, 2011, at 7:43, zedtuxreply@reply.github.com wrote:
Hello,
I did like explained in the documentation:
$ gem install bundle_outdated
$ gem update --system 1.6.0
$ bundle-outdated
Finding outdated gems..
/Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/gem_dependency.rb:40:in<': comparison of Gem::Version with nil failed (ArgumentError) from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/gem_dependency.rb:40:in
outdated?'
from /Users/zedtux/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:into_proc' from /Users/zedtux/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
find_all'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:ineach' from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:in
find_all'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:inoutdated_gems' from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:8:in
search!'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated.rb:7:insearch!' from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/bin/bundle-outdated:23 from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/bin/bundle-outdated:19:in
load'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/bin/bundle-outdated:19I've added at line 34 of the file lib/bundle_outdated/gem_dependency.rb the line
puts "latest_version_for(#{name}): #{Gem.latest_version_for(name)}"
Then I got this output:
$ bundle-outdated
Finding outdated gems..
latest_version_for(bundler): 1.0.13
latest_version_for(rake): 0.8.7
latest_version_for(activesupport): 3.0.7
latest_version_for(activerecord): 3.0.7
latest_version_for(actionpack): 3.0.7
latest_version_for(actionmailer): 3.0.7
latest_version_for(activeresource): 3.0.7
latest_version_for(rails): 3.0.7
latest_version_for(rmagick): 2.13.1
latest_version_for(uuid): 2.3.2
latest_version_for(ruby-ole): 1.2.11.1
latest_version_for(rjb): 1.3.4
latest_version_for(RedCloth): 4.2.7
latest_version_for(thinking-sphinx): 2.0.3
latest_version_for(haml): 3.1.1
latest_version_for(paperclip): 2.3.11
latest_version_for(will_paginate): 2.3.15
latest_version_for(datanoise-actionwebservice):
/Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/gem_dependency.rb:40:in<': comparison of Gem::Version with nil failed (ArgumentError) from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/gem_dependency.rb:40:in
outdated?'
from /Users/zedtux/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:into_proc' from /Users/zedtux/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
find_all'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:ineach' from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:in
find_all'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:inoutdated_gems' from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:8:in
search!'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated.rb:7:insearch!' from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/bin/bundle-outdated:23 from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/bin/bundle-outdated:19:in
load'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/bin/bundle-outdated:19Reply to this email directly or view it on GitHub:
#2
I have the same issue.
I think it's because I have a Gem that is not available publicly (it is mentioned in the Gemfile and vendorized in the Rails app).
If I remove it, bundle-outdated
runs fine.
Could you still share your Gemfile
though? You may of course mask out parts that shouldn't be made public.
source :rubygems
gem 'rails', '3.0.7'
gem 'mysql2', '~> 0.2.7'
# Notre gem maison
gem 'my_gem', '~> 1.0', :path => './vendor/gems/my_gem'
gem 'capistrano'
gem 'capistrano-ext'
gem 'rest-client', '~> 1.6.1'
gem 'hashie', '~> 0.3'
gem "breadcrumbs_on_rails", '~> 1.0'
gem 'will_paginate', '~> 3.0.pre2'
gem 'rdiscount', '~> 1.6'
gem "yajl-ruby", '~> 0.7', :require => "yajl"
gem 'newrelic_rpm', '~> 2.13'
gem 'hoptoad_notifier'
gem "hiredis", "~> 0.3.1"
gem 'redis', '~> 2.2.0', :require => ["redis/connection/hiredis", "redis"]
gem 'system_timer'
gem 'jquery-rails'
gem 'geokit', '~> 1.5'
gem 'geokit-rails3', '~> 0.1.3'
gem 'fastercsv', :require => 'faster_csv'
gem 'whenever'
# On n'utilise pas la gem 'aws-s3'
# car elle est incompatible avec les buckets en Europe.
gem 's3', '~> 0.3'
gem 'paperclip', '~> 2.3'
group :development do
gem 'g'
gem 'irbtools', :require => 'irbtools/configure'
end