Gem command works locally, not on remote machine

I’m having some trouble with the gem command. On my local MacBook Pro
the gem command works fine…

$ sudo gem outdated
Password:

…just returns nothing, as expected.

$ sudo gem update --system
Updating RubyGems
Nothing to update
$

On my CentOS 5 VPS I get a completely different response…

$ su -

gem outdated

Bulk updating Gem source index for: http://gems.rubyforge.org

And it just stops there without returning to the command prompt. Same
deal with any gem subcommand I try.

Local gem environment:

  • RUBYGEMS VERSION: 1.2.0
  • RUBY VERSION: 1.8.6 (2007-03-13 patchlevel 0) [universal-
    darwin8.0]
  • INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
  • RUBY EXECUTABLE: /usr/local/bin/ruby
  • EXECUTABLE DIRECTORY: /usr/local/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • universal-darwin-8
  • GEM PATHS:
    • /usr/local/lib/ruby/gems/1.8
  • GEM CONFIGURATION:
  • REMOTE SOURCES:

Remote:

gem environment
RubyGems Environment:

  • RUBYGEMS VERSION: 1.0.1 (1.0.1)
  • RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [x86_64-linux]
  • INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
  • RUBY EXECUTABLE: /usr/local/bin/ruby
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86_64-linux
  • GEM PATHS:
    • /usr/local/lib/ruby/gems/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:

OK, the remote version is 1.0.1 and local is 1.2.0. I tried to upgrade
RubyGems by running…

gem update --system

but it froze without returning as described above.

Any ideas why this would be? Any suggestions for how to get gems
working?

Thanks,

E

On 2008-08-29 06:51:00 +0100, eeby [email protected] said:

On my CentOS 5 VPS I get a completely different response…

$ su -

gem outdated

Bulk updating Gem source index for: http://gems.rubyforge.org

And it just stops there without returning to the command prompt.

There’s an issue with gem on low memory machines; I believe that the
YAML representation of the source index that it builds from the info on
gems.rubyforge.org takes up so much memory that a 256MB VPS can’t
really cope with it and starts swapping heavily. top should verify
whether or not this is your problem.

I’ve had success with a VPS with 512MB of memory.

I’m not sure if this issue has been fixed yet, but in an emergency you
should be able to install updates by downloading them manually and
installing them from a local gem file.

Graham

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs