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>
gemexecutable 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 doesputs Gem.ruby_versionshows in irb? – karatedog Dec 5 '11 at 13:141.9.3.0, updated question – sam Dec 5 '11 at 13:30rvmto install rubies? – karatedog Dec 6 '11 at 0:44rubygems-updategem in itself, then issue thegem 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