intermittent gem install failure - could not find gem rubyforge locally or in a repository.

apsoto's Avatar

apsoto

17 Feb, 2010 05:05 AM

I'm using chef to install gems. It's been working fine for a while but over the last few weeks I've noticed that gem installations are intermittently failing with the error:

could not find gem rubyforge locally or in a repository.

It's not specific to any gem, I've seen it error out on a variety of gems. Eventually after a few tries it works. I'm thinking it's a bad mirror in rotation?

More Error Context:

gem install rubyforge -q --no-rdoc --no-ri -v "1.0.4" -V returned 2, expected 0
---- Begin output of gem install rubyforge -q --no-rdoc --no-ri -v "1.0.4" -V ----
STDOUT: 
STDERR: ERROR:  could not find gem rubyforge locally or in a repository
---- End output of gem install rubyforge -q --no-rdoc --no-ri -v "1.0.4" -V ----
  1. Support Staff 1 Posted by Nick Quaranto on 17 Feb, 2010 05:14 AM

    Nick Quaranto's Avatar

    Gemcutter doesn't use mirrors, it's all talking to S3 now...what version of RubyGems are you using? The output of gem env should help.

    Also, just curious...are you using Chef on EC2 to install gems? We have another issue open regarding this from Engine Yard and I wonder if it's related...

  2. 2 Posted by Garret Heaton on 17 Feb, 2010 06:12 AM

    Garret Heaton's Avatar

    I also have this issue installing gems on EC2 (via Chef and command line). I often run in to the following: http://gist.github.com/304368

    My temporary 'solution' is to run "gem sources -c" before each gem I install. That seems to work about 80% of the time.

  3. 3 Posted by apsoto on 17 Feb, 2010 08:08 AM

    apsoto's Avatar

    yes I'm using chef on EC2 using 64bit CentOS. I've seen the Engine yard issue in their forums and it sounds very similar to what I'm experiencing, however I'm not using Engine Yard.

    Gem Env Output:
    RubyGems Environment:
      - RUBYGEMS VERSION: 1.3.1
      - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [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
         - /root/.gem/ruby/1.8
      - GEM CONFIGURATION:
         - :update_sources => true
         - :verbose => true
         - :benchmark => false
         - :backtrace => false
         - :bulk_threshold => 1000
         - "gem" => "--no-ri --no-rdoc"
         - :sources => ["http://gems.rubyforge.org/", "http://gems.opscode.com"]
      - REMOTE SOURCES:
         - http://gems.rubyforge.org/
         - http://gems.opscode.com
    
  4. 4 Posted by Garret Heaton on 17 Feb, 2010 04:00 PM

    Garret Heaton's Avatar

    Here's my gem env:

    RubyGems Environment:
      - RUBYGEMS VERSION: 1.3.5
      - RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
      - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
      - RUBY EXECUTABLE: /usr/bin/ruby1.8
      - EXECUTABLE DIRECTORY: /usr/bin
      - RUBYGEMS PLATFORMS:
        - ruby
        - x86-linux
      - GEM PATHS:
         - /usr/lib/ruby/gems/1.8
         - /root/.gem/ruby/1.8
      - GEM CONFIGURATION:
         - :update_sources => true
         - :verbose => true
         - :benchmark => false
         - :backtrace => false
         - :bulk_threshold => 1000
      - REMOTE SOURCES:
         - http://rubygems.org
         - http://gems.opscode.com
    

    I install the gem binary using:

    apt-get install -y --force-yes ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert
    cd /tmp
    wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
    tar zxf rubygems-1.3.5.tgz
    cd /tmp/rubygems-1.3.5
    ruby setup.rb
    ln -sfv /usr/bin/gem1.8 /usr/bin/gem
    
    gem sources -a http://gems.opscode.com
    gem sources -a http://rubygems.org
    gem sources -r http://gems.rubyforge.org/ # old
    

    This is on Ubuntu 9.04, btw.

  5. Support Staff 5 Posted by Nick Quaranto on 13 Mar, 2010 06:42 PM

    Nick Quaranto's Avatar

    We've heard several reports of problems with EC2 downloading gems but we still can't nail it down. Here's the other thread, if it helps:

    http://help.rubygems.org/discussions/problems/21-odd-behavior-with-...

  6. 6 Posted by Philip Gardner on 16 Jun, 2010 10:32 PM

    Philip Gardner's Avatar

    I seem to be running into the same issue. I'm using puppet to install some gems (not on EngineYard) on primarily CentOS 64-bit machines. Here is my gem env:

    RubyGems Environment:
    - RUBYGEMS VERSION: 1.3.1
    - RUBY VERSION: 1.8.5 (2006-08-25) [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
       - /root/.gem/ruby/1.8
    - GEM CONFIGURATION:
       - :update_sources => true
       - :verbose => true
       - :benchmark => false
       - :backtrace => false
       - :bulk_threshold => 1000
    - REMOTE SOURCES:
       - http://gems.rubyforge.org/
    

    This also seems to occur even if I run the command by hand at times:

    [root@itdev-puppetmaster02 ~]# /usr/bin/gem install -v 2.3.5 --include-dependencies rails
    INFO:  `gem install -y` is now default and will be removed
    INFO:  use --ignore-dependencies to install only the gems you list
    ERROR:  could not find gem rails locally or in a repository
    

    Running the command gem sources -c prior to running it by hand does seem to solve the problem most of the time, though it doesn't help anyone figure out the root cause.

    If it helps, I've attached output from running strace while trying to download and install these gems:

    strace /usr/bin/gem install -v 2.3.5 --include-dependencies rails

  7. 7 Posted by apsoto on 17 Jun, 2010 03:32 AM

    apsoto's Avatar

    Yep, still happens fairly often with me even though I run gem sources -c

    I just keep trying and it eventually works. I've been told rubygems.org doesn't use any sort of mirroring for the hosted gems, but it sure looks like it's having intermittent issues with finding gem files, but if I just keep re-running the command it eventually works.

  8. 8 Posted by kwilcox on 18 Jun, 2010 06:01 PM

    kwilcox's Avatar

    Still happening for me, all time time, everytime! Any word on progress?

  9. Support Staff 9 Posted by Nick Quaranto on 13 Jul, 2010 09:14 PM

    Nick Quaranto's Avatar

    Sorry about the massive delays here. Are you behind a NAT or firewall? Can you provide us with the output of gem env? Are connections to Amazon S3 or CloudFront blocked?

  10. 10 Posted by Math on 07 Aug, 2010 08:20 AM

    Math's Avatar

    Still same problem for me.
    Using gem sources -c after every try of gem install fixes it.

    Is there any info I can provide to help with that problem?
    I can give root access if helpful.

    Linux Serverr 2.6.26-2-xen-amd64 #1 SMP Sun Jun 20 20:51:58 UTC 2010 x86_64 GNU/Linux

    RubyGems Environment:
      - RUBYGEMS VERSION: 1.2.0
      - RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
      - INSTALLATION DIRECTORY: /var/lib/gems/1.8
      - RUBY EXECUTABLE: /usr/bin/ruby1.8
      - EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
      - RUBYGEMS PLATFORMS:
        - ruby
        - x86_64-linux
      - GEM PATHS:
         - /var/lib/gems/1.8
      - GEM CONFIGURATION:
         - :update_sources => true
         - :verbose => true
         - :benchmark => false
         - :backtrace => false
         - :bulk_threshold => 1000
      - REMOTE SOURCES:
         - http://gems.rubyforge.org/
    
  11. Support Staff 11 Posted by Nick Quaranto on 14 Aug, 2010 04:04 PM

    Nick Quaranto's Avatar

    If anyone could show us the AMI or region where this is happening in EC2? We're still not sure about this or why it's happening.

  12. 12 Posted by kwilcox on 14 Aug, 2010 05:11 PM

    kwilcox's Avatar

    I'm having problems on us-east-1b on both Windows and Linux Quick Start 32-bit AMIs.

  13. Support Staff 13 Posted by Nick Quaranto on 04 Aug, 2012 06:38 PM

    Nick Quaranto's Avatar

    Sorry, this comment was buried in our spam inbox.

    We haven't heard of connection issues lately...is this still happening?

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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