'gem install' always prefers local files with partial name match

Hiro Asari's Avatar

Hiro Asari

20 Jul, 2010 04:42 AM

If you try to install gem with a shorter name (e.g., active_form) from a remote server but you have a .gem file of another gem with a longer name (e.g., active_forms) in the working directory, 'gem install' will use the gem file. The exact match should be preferred.

$ ruby -v -S gem install --ignore-dependencies --no-rdoc --no-ri active_forms-0.2.1.gem
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-darwin10.4.0]
Successfully installed active_forms-0.2.1
1 gem installed
$ ruby -v -S gem install --ignore-dependencies --no-rdoc --no-ri active_form
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-darwin10.4.0]
Successfully installed active_forms-0.2.1
1 gem installed

This was first reported by Stephen Bannasch in http://jira.codehaus.org/browse/JRUBY-4934.

  1. Support Staff 1 Posted by Nick Quaranto on 14 Aug, 2010 03:28 PM

    Nick Quaranto's Avatar

    Yeah, this sounds like a bug, it would be best if a bug was opened up on RubyGems' bug tracker:

    http://rubyforge.org/tracker/?func=add&group_id=126&atid=575

  2. 2 Posted by wingfire on 20 Aug, 2010 07:02 AM

    wingfire's Avatar
  3. Support Staff 3 Posted by Nick Quaranto on 31 Aug, 2010 01:36 AM

    Nick Quaranto's Avatar

    Great, going to keep it in the rubygems tracker then. Closing this one.

  4. Nick Quaranto closed this discussion on 31 Aug, 2010 01:36 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac