Gem command works locally, not on remote machine

E

eeby

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:
- :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

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:
- http://gems.rubyforge.org

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
 
G

Graham Ashton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top