简体   繁体   中英

ruby stuck in 1.8.7 on ubuntu

Today I learned that Ubuntu is bundled with Ruby 1.8.7. I want 1.9.2, but getting Ruby 1.9.2 working has been frustrating.

First, note that Ruby 1.9.2 is already installed on my system.

Here's what's happening:

$ ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

$ rvm list
rvm rubies

=* ruby-1.9.2-p290 [ x86_64 ]
ruby-1.9.3-p0 [ x86_64 ]

$ printenv PATH
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

$ which ruby
/usr/bin/ruby

$ which rvm
/usr/bin/rvm

RVM hasn't initialized correctly. Your path should show RVM's managed directories first.

Have you added the RVM initializer to your .bash_profile or .bashrc , and have you restarted your shell session or logged out then back in?

Have you followed the installation and troubleshooting directions at http://rvm.beginrescueend.com/rvm/install ?

Please append the output of rvm info to your question.

Normally RVM would install inside your ~/.rvmrc directory for a single-user sandbox. Because it is at /usr/bin/rvm that tells me you installed it as root or did a sudo when you installed it. I highly recommend not bothering with multi-user RVM unless you have a really good reason, and instead use the single-user install.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM