Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Trying to update gem

[root@nuuk ~]# ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]

but when I do gem update --system I get

[root@nuuk ruby-1.9.3-p0]# gem update --system
Updating RubyGems
Updating rubygems-update
ERROR:  While executing gem ... (Gem::InstallError)
    rubygems-update requires Ruby version >= 1.8.7

How do I tell gem where my ruby executable is?

[root@nuuk ~]# which ruby
/usr/local/bin/ruby
[root@nuuk ~]# /usr/local/bin/ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
[root@nuuk ~]# gem -v
1.3.1
[root@nuuk ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
[root@nuuk ~]# irb
irb(main):001:0> puts Gem.ruby_version
1.9.3.0
=> nil
irb(main):002:0>
share|improve this question
The gem executable contains a version check right at the beginning, which should fail with an error message if your Ruby version is lower than 1.8.7. But your gem executable passes this and the above error is thrown later in the process. Which means the problem is elsewhere. What does puts Gem.ruby_version shows in irb? – karatedog Dec 5 '11 at 13:14
@karatedog 1.9.3.0, updated question – sam Dec 5 '11 at 13:30
Do you use rvm to install rubies? – karatedog Dec 6 '11 at 0:44
@karatedog Nope, built from source. I'm going to try building gems from source today. – sam Dec 6 '11 at 8:42
I'm guessing a bit, but try installing the rubygems-update gem in itself, then issue the gem update --system. This would install the above gem anyway among other things, but installing it first will somewhat isolate it from the update process. – karatedog Dec 6 '11 at 14:15
show 2 more comments

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.