[Rubygems-developers] [ rubygems-Bugs-28118 ] first gem fails to install when installing two gems with specific version constraints

noreply at rubyforge.org noreply at rubyforge.org
Mon Apr 19 23:35:15 EDT 2010


Bugs item #28118, was opened at 2010-04-19 22:35
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=28118&group_id=126

Category: `gem install` command
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Stephen Bannasch (stepheneb)
Assigned to: Nobody (None)
Summary: first gem fails to install when installing two gems with specific version constraints

Initial Comment:
When installing two gems that have specific version constrains the first gem will no be installed with an error like this:

  ERROR:  could not find gem <gem_name> locally or in a repository

Both the gems ci_reporter and hpricot exist in multiple versions:

  $ gem list -a -r ci_reporter

  *** REMOTE GEMS ***

  ci_reporter (1.6.2, 1.6.1, 1.6.0, 1.5.3, 1.5.2, 1.5.1, 1.5, 1.4, 1.3.5, 1.3.4, 1.3.3, 1.3.2, 1.3.1, 1.3, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2, 1.1, 1.0)

  $ gem list -a -r hpricot

  *** REMOTE GEMS ***

  hpricot (0.8.2, 0.8.1, 0.8, 0.7, 0.6.164, 0.6.161, 0.6, 0.5, 0.4)

When I try and install multiple gems with specific version constraints gem reports the first gem can't be found.

  $ sudo gem install ci_reporter -v'>= 1.6.0' hpricot -v'= 0.6.164'
  ERROR:  could not find gem ci_reporter locally or in a repository
  Building native extensions.  This could take a while...
  Successfully installed hpricot-0.6.164
  1 gem installed
  /Library/Ruby/Gems/1.8/gems/rdoc-2.5.4/lib/rdoc/ruby_lex.rb:67: warning: parenthesize argument(s) for future version
  Installing ri documentation for hpricot-0.6.164...
  Building YARD (yri) index for hpricot-0.6.164...
  Installing RDoc documentation for hpricot-0.6.164...

If I instead uninstall hpricot and reverse the order of the installed gems, gem reports the other gem can't be found:

  $ sudo gem uninstall hpricot
  Successfully uninstalled hpricot-0.6.164

  $ sudo gem install hpricot -v'= 0.6.164' ci_reporter -v'>= 1.6.0' 
  ERROR:  could not find gem hpricot locally or in a repository
  Successfully installed ci_reporter-1.6.2
  1 gem installed
  /Library/Ruby/Gems/1.8/gems/rdoc-2.5.4/lib/rdoc/ruby_lex.rb:67: warning: parenthesize argument(s) for future version
  Installing ri documentation for ci_reporter-1.6.2...
  Building YARD (yri) index for ci_reporter-1.6.2...
  Installing RDoc documentation for ci_reporter-1.6.2...


$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.6
  - RUBY VERSION: 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.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-9
  - GEM PATHS:
     - /Library/Ruby/Gems/1.8
     - /Users/stephen/.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
     - :sources => ["http://rubygems.org", "http://gems.opscode.com/"]
     - "gemcutter_key" => "12a51589b36ebd91e969de9fedfb5c17"
  - REMOTE SOURCES:
     - http://rubygems.org
     - http://gems.opscode.com/

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=28118&group_id=126


More information about the Rubygems-developers mailing list