[Rubygems-developers] [ rubygems-Bugs-27960 ] rubygems 1.3.6 can't fetch a gem with a version other than the newest version

noreply at rubyforge.org noreply at rubyforge.org
Thu Apr 22 00:30:37 EDT 2010


Bugs item #27960, was opened at 2010-03-12 13:21
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=27960&group_id=126

Category: `gem` commands (remote behavior)
Group: v1.3.x
Status: Closed
Resolution: Accepted
Priority: 3
Submitted By: Eric Hankins (stormsilver)
Assigned to: Eric Hodel (drbrain)
Summary: rubygems 1.3.6 can't fetch a gem with a version other than the newest version

Initial Comment:
It seems that with the newest version of rubygems, gem fetch can only fetch the newest version of a gem. If you specify any version other than the newest one in a given repo, it tells you that it cannot find the gem. Here is an example session showing the problem with activesupport, but it happens with any gem.

# gem -v
1.3.6


# ruby -v
ruby 1.8.6 (2008-08-11 patchlevel 287) [x86_64-linux]


# gem sources
*** CURRENT SOURCES ***

http://rubygems.org


# gem list -r -a activesupport

*** REMOTE GEMS ***

activesupport (2.3.5, 2.3.4, 2.3.3, 2.3.2, 2.2.3, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.4, 2.0.2, 2.0.1, 2.0.0, 1.4.4, 1.4.3, 1.4.2, 1.4.1, 1.4.0, 1.3.1, 1.3.0, 1.2.5, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.1.1, 1.1.0, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0)
activesupport-jcache (0.1.0)


# gem fetch activesupport -v 2.3.2
ERROR:  Could not find activesupport in any repository


# gem fetch activesupport -v "=2.3.2"
ERROR:  Could not find activesupport in any repository


# gem fetch activesupport -v "=2.3.4"
ERROR:  Could not find activesupport in any repository


# gem fetch activesupport -v "=2.3.5"
Downloaded activesupport-2.3.5

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

Comment By: Stephen Bannasch (stepheneb)
Date: 2010-04-21 23:30

Message:
To close the side thread about the visibility of the gemcutter API keyin the: 'gem env' output -- here's what Nick Quaranto wrote:

From: Nick Quaranto
Subject: how to revoke a gemcutter API key?

You can safely remove that line from your `~/.gemrc`. It's not used anymore after several complaints about this very situation, which is why it lives in `~/.gem/credentials` now.


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

Comment By: Stephen Bannasch (stepheneb)
Date: 2010-04-21 17:47

Message:
Thanks for that warning James, I wondered about that just after I posted the comment.

I haven't been able to figure out yet how to revoke the gemcutter key.

The key displayed by: gem env -- is not the key stored here: 

  ~/.gem/credentials

Which appears to be what is used now: http://rubygems.org/pages/gem_docs

It's a bit annoying that: gem env displays the key ;-)

I'll keep looking to make sure the key is revoked.

Thanks again.

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

Comment By: James Tucker (raggi)
Date: 2010-04-21 04:26

Message:
You need to revoke your gemcutter key now Stephen, and generate a new one

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

Comment By: Eric Hodel (drbrain)
Date: 2010-04-20 23:19

Message:
Fixed.

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

Comment By: Stephen Bannasch (stepheneb)
Date: 2010-04-19 22:20

Message:
I've confirmed this same bug on MacOS X 10.5.8.

The problem occurs using: gem fetch and does not occur using: gem install

$ gem list -r -a 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 fetch ci_reporter -v '= 1.6.0'
ERROR:  Could not find ci_reporter in any repository

$ sudo gem install ci_reporter -v '= 1.6.0'
Successfully installed ci_reporter-1.6.0
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.0...
Building YARD (yri) index for ci_reporter-1.6.0...
Installing RDoc documentation for ci_reporter-1.6.0...

$ 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=27960&group_id=126


More information about the Rubygems-developers mailing list