我正在尝试学习Ruby,而我发现安装它的最常见方法之一是RVM。运行rvm install 2.1.2
以获取最新版本后,它似乎完成正常,但在执行ruby -v
时会显示此输出:
chris @ ubuntu:〜$ ruby -v
ruby 1.9.3p484(2013-11-22修订版43786)[x86_64-linux]
这是错误的版本。执行rvm list
仅显示2.1.2:
chris @ ubuntu:〜$ rvm list
rvm红宝石
= * ruby-2.1.2 [x86_64]
做一个rvm reinstall 2.1.2
也很好,但我仍然安装了错误的Ruby版本。这是输出:
chris@ubuntu:~$ rvm reinstall ruby-2.1.2
ruby-2.1.2 - #removing rubies/ruby-2.1.2..
Searching for binary rubies, this might take some time.
Found remote file https://rvm.io/binaries/ubuntu/14.04/x86_64/ruby-2.1.2.tar.bz2
Checking requirements for ubuntu.
Requirements installation successful.
ruby-2.1.2 - #configure
ruby-2.1.2 - #download
ruby-2.1.2 - #validate archive
ruby-2.1.2 - #extract
ruby-2.1.2 - #validate binary
ruby-2.1.2 - #setup
ruby-2.1.2 - #gemset created /home/chris/.rvm/gems/ruby-2.1.2@global
ruby-2.1.2 - #importing gemset /home/chris/.rvm/gemsets/global.gems....................................
ruby-2.1.2 - #generating global wrappers........
ruby-2.1.2 - #gemset created /home/chris/.rvm/gems/ruby-2.1.2
ruby-2.1.2 - #importing gemsetfile /home/chris/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.1.2 - #generating default wrappers........
Making gemset ruby-2.1.2 pristine........................................................................
Making gemset ruby-2.1.2@global pristine...............................................................
答案 0 :(得分:0)
尝试
rvm use <your ruby version>
安装只安装它。它没有使用它。