如何在Cloud9中安装“真正的rvm”?

时间:2014-09-26 01:21:06

标签: rvm cloud9-ide

我需要在Cloud9中使用Ruby 2.1.2。已经安装了rvm,所以很不错:

samueller@test2:~/workspace $ rvm -v
Warning! PATH is not properly set up, '/usr/local/rvm/gems/ruby-2.1.1@rails4/bin' is not at first place,
         usually this is caused by shell initialization files - check them for 'PATH=...' entries,
         it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
         to fix temporarily in this shell session run: 'rvm use ruby-2.1.1@rails4'.
rvm 1.25.28 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

恼人的警告......当我尝试运行rvm install 2.1.2时收到错误,但后来我注意到这个支持网页是关于在https://docs.c9.io/writing_a_ruby_app.html安装“真正的rvm”:

curl -L https://get.rvm.io | bash -s stable

不幸的是,虽然我也遇到了错误,但仍无法安装最新的Ruby:

samueller@test:~/workspace $ curl -L https://get.rvm.io | bash -s stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   184  100   184    0     0    381      0 --:--:-- --:--:-- --:--:--   382
100 20819  100 20819    0     0  35708      0 --:--:-- --:--:-- --:--:-- 35708
Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz

Upgrading the RVM installation in /usr/local/rvm/
    Can not update 'scripts/zsh/Completion/_rvm', it's a conflict between Zsh and multiuser installation, prefix the command with 'rvmsudo' to update this file.
    Can not update 'scripts/extras/completion.zsh/_rvm', it's a conflict between Zsh and multiuser installation, prefix the command with 'rvmsudo' to update this file.
    Found 48293 files not belonging to 'rvm',
use `--debug` to see the list, run `rvmsudo rvm get stable` to fix it., prefix the command with 'rvmsudo' to fix it, if the situation persist report a bug.
    Found 7731 directories with mode different then '775',
use `--debug` to see the list, run `rvmsudo rvm get stable` to fix it., prefix the command with 'rvmsudo' to fix it, if the situation persist report a bug.
    Found 7074 files with mode different then '664' or '775',
use `--debug` to see the list, run `rvmsudo rvm get stable` to fix it., prefix the command with 'rvmsudo' to fix it, if the situation persist report a bug.
Upgrade of RVM in /usr/local/rvm/ is complete.

# Scott Mueller,
#
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.

In case of problems: http://rvm.io/help and https://twitter.com/rvm_io

Upgrade Notes:

  * No new notes to display.

samueller@test:~/workspace $ curl -L https://get.rvm.io | bash -s stable --ruby
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   184  100   184    0     0    417      0 --:--:-- --:--:-- --:--:--   417
100 20819  100 20819    0     0  37239      0 --:--:-- --:--:-- --:--:-- 37239
Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz

Upgrading the RVM installation in /usr/local/rvm/
    Can not update 'scripts/zsh/Completion/_rvm', it's a conflict between Zsh and multiuser installation, prefix the command with 'rvmsudo' to update this file.
    Can not update 'scripts/extras/completion.zsh/_rvm', it's a conflict between Zsh and multiuser installation, prefix the command with 'rvmsudo' to update this file.
    Found 48293 files not belonging to 'rvm',
use `--debug` to see the list, run `rvmsudo rvm get stable` to fix it., prefix the command with 'rvmsudo' to fix it, if the situation persist report a bug.
    Found 7731 directories with mode different then '775',
use `--debug` to see the list, run `rvmsudo rvm get stable` to fix it., prefix the command with 'rvmsudo' to fix it, if the situation persist report a bug.
    Found 7074 files with mode different then '664' or '775',
use `--debug` to see the list, run `rvmsudo rvm get stable` to fix it., prefix the command with 'rvmsudo' to fix it, if the situation persist report a bug.
Upgrade of RVM in /usr/local/rvm/ is complete.

# Scott Mueller,
#
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.

In case of problems: http://rvm.io/help and https://twitter.com/rvm_io

Upgrade Notes:

  * No new notes to display.

rvm 1.25.31 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
Warning! PATH is not properly set up, '/usr/local/rvm/gems/ruby-2.1.1@rails4/bin' is not at first place,
         usually this is caused by shell initialization files - check them for 'PATH=...' entries,
         it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
         to fix temporarily in this shell session run: 'rvm use ruby-2.1.1@rails4'.
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/14.04/x86_64/ruby-2.1.3.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    50    0    50    0     0      2      0 --:--:--  0:00:18 --:--:--    11
/usr/local/rvm/scripts/functions/utility: line 416: 1.4G: syntax error: invalid arithmetic operator (error token is ".4G")

我可以使用Cloud9安装Ruby 2.1.2或2.1.3吗? rvm是否可以正常使用Cloud9?

1 个答案:

答案 0 :(得分:7)

在C9中几乎无法做到。 答案基本上列在您发布的错误中。尝试:

$ rvmsudo rvm get head

升级需要一些时间,但耐心会得到回报:安装这些Ruby版本应该像魅力一样工作。