rvm - 如何在Cloud9中安装 "the real rvm"?

标签 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 时出现错误,但后来我注意到这个关于安装“真正的 rvm”的支持网页 https://docs.c9.io/writing_a_ruby_app.html :

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 正常工作?

最佳答案

在 C9 中几乎没有什么是做不到的。 答案基本上列在您发布的错误中。尝试:

$ rvmsudo rvm get head

升级需要一些时间,但耐心会得到返回:安装这些 Ruby 版本应该会很顺利。

关于rvm - 如何在Cloud9中安装 "the real rvm"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26050624/

相关文章:

JavaScript 文档生成器 Cloud9 IDE

node.js - C9 错误 : Spawn disabled for securtity reasons

ruby-on-rails - 帮我整理我的 ruby

Heroku Toolbelt 安装问题

mysql - 无法启动 MySQL CLOUD9

mysql - cloud9-ide在mysql中导入数据库

node.js - 如何连接到在 cloud9 服务器内部的 'localhost' 上运行的进程

ruby - rvm 不导入 gem 路径

ruby-on-rails - 安装了两个版本的 rake = 错误

ruby-on-rails - rvm update 和 rvm remove 中的权限被拒绝