[Rubygems-developers] [ rubygems-Bugs-26109 ] gem install gemname --remote will fail if gemname is in current directory

noreply at rubyforge.org noreply at rubyforge.org
Fri Aug 20 02:47:51 EDT 2010


Bugs item #26109, was opened at 2009-06-02 22:03
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=26109&group_id=126

Category: `gem install` command
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: ara howard (ahoward)
Assigned to: Nobody (None)
Summary: gem install gemname --remote will fail if gemname is in current directory

Initial Comment:
gem install gemname --remote  will prefer a gem in the current directory.  seems like --remote should *never* do *anything* local?

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

Comment By: Christof Spies (wingfire)
Date: 2010-08-20 06:47

Message:
I can confirm this issue.
i.e. you have an outdated gem file in your home directory and run  "gem update" from home then gem reinstall the old gem from the home directory. "gem update -r" is also "updating" with the outdated local gem.

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

Comment By: Nick Hildebrant (nihildeb)
Date: 2009-08-27 22:37

Message:
Just familiarizing myself with the code here. I now see the issue.

#find_gems_with_sources probably should only merge gem sources if @domain == :both

also I don't see a case in which setting @domain = :local after rescuing a RemoteFetch exception would be useful or make sense

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

Comment By: Nick Hildebrant (nihildeb)
Date: 2009-08-26 20:54

Message:
I can not reproduce this issue as a "preference". 

Rubygems appears to do remote as requested with requested gem in pwd.

In the case of no network availability, the requested gem in the pwd is installed. This is as designed: Gem::DependencyInstaller#find_gems_with_sources rescues with @domain = :local

RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.3
  - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/1.8
     - /home/nihildeb/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["http://gems.rubyforge.org", "http://gems.github.com"]
  - REMOTE SOURCES:
     - http://gems.rubyforge.org
     - http://gems.github.com






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

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


More information about the Rubygems-developers mailing list