有谁知道如何在 Ubuntu 11.10 上正确卸载 Ruby 1.8.7 并安装 Ruby 1.9.2?
我已经彻底搜索过,但我发现的教程都没有奏效。
此外,我花了很长时间试图让 RVM 工作,但使用起来很痛苦。此外,我对旧版本几乎没有用处。
更新输出:
which ruby:
/usr/local/bin/ruby
Run Code Online (Sandbox Code Playgroud)
ls -l /usr/local/bin/ruby:
lrwxrwxrwx 1 root root 16 2011-10-17 21:20 /usr/local/bin/ruby -> /usr/bin/ruby1.8
Run Code Online (Sandbox Code Playgroud)
ls -l /etc/alternatives/ruby:
lrwxrwxrwx 1 root root 18 2011-12-30 17:35 /etc/alternatives/ruby -> /usr/bin/ruby1.9.1
Run Code Online (Sandbox Code Playgroud)
echo $PATH:
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
Run Code Online (Sandbox Code Playgroud)
顺便说一句,当我查看 --config gem 时,它告诉我只有一个 gem,即 /usr/bin/gem1.9.1
Ham*_*ner 30
两者都安装有问题吗?并使用存储库中的版本?我会安装 ruby 1.9.2:
sudo apt-get install ruby1.9.1-full
Run Code Online (Sandbox Code Playgroud)
然后更新“替代品”系统以使用 ruby 1.9:
$ sudo update-alternatives --config ruby
There are 2 choices for the alternative ruby (providing /usr/bin/ruby).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/ruby1.8 50 auto mode
1 /usr/bin/ruby1.8 50 manual mode
2 /usr/bin/ruby1.9.1 10 manual mode
Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/ruby1.9.1 to provide /usr/bin/ruby (ruby) in manual mode.
$ ruby --version
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
Run Code Online (Sandbox Code Playgroud)
这也将设置为替代品erb,irb,rdoc,ri,testrb,该名男子页。但是你需要单独更新 gem 命令:
$ sudo update-alternatives --config gem
There are 2 choices for the alternative gem (providing /usr/bin/gem).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/gem1.8 180 auto mode
1 /usr/bin/gem1.8 180 manual mode
2 /usr/bin/gem1.9.1 10 manual mode
Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/gem1.9.1 to provide /usr/bin/gem (gem) in manual mode.
Run Code Online (Sandbox Code Playgroud)
我知道,它被混淆地称为 ruby1.9.1 而不是 1.9.2,一些上游 debian 打包的东西。
| 归档时间: |
|
| 查看次数: |
60255 次 |
| 最近记录: |