[Rubygems-developers] GEM_PATH is ignored when looking for installed dependencies

Martin Krauskopf martin.krauskopf at gmail.com
Sun Jan 27 18:22:47 EST 2008


I'm encountering strange behavior wrt. to Gem Path. Best to show an
example (ruby-debug depends on ruby-debug-base):

   $ gem env
   RubyGems Environment:
     - INSTALLATION DIRECTORY: /space/ruby/gem-repo
     - GEM PATHS:
       - /space/ruby/gem-repo-c
       - /space/ruby/gem-repo

   $ ls -d /space/ruby/gem-repo-c/gems/ruby-debug-base-0.9.3
   $ ls -d /space/ruby/gem-repo/gems/ruby-debug-*
   ls: /space/ruby/gem-repo/gems/ruby-debug-*: No such file or directory
   $ gem install ruby-debug -v 0.9.3 # ERROR HERE IN INSTALLING -base
   Building native extensions.  This could take a while...
   Successfully installed ruby-debug-base-0.9.3
   Successfully installed ruby-debug-0.9.3
   2 gems installed
   $ ls -d /space/ruby/gem-repo/gems/ruby-debug-*
   /space/ruby/gem-repo/gems/ruby-debug-base-0.9.3 # REDUNDANT

Why is ruby-debug-base installed second time into main repository
(/space/ruby/gem-repo) when it is already installed in the 'secondary'
repository (/space/ruby/gem-repo-c).

$ gem install ruby-debug -v 0.9.3

in the example above should not install ruby-debug-base (second time).
Did I misunderstood Gem Path usage or is it bug?

Should not a DependencyInstaller#install fill source_index from all
repositories on the Gem Path?


More information about the Rubygems-developers mailing list