使用 RVM 安装 Ruby 2.0.0
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15108673/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Installing Ruby 2.0.0 using RVM
提问by Rahul Tapali
I have tried installing Ruby 2.0.0using RVM:
我试过安装Ruby 2.0.0使用RVM:
rvm install 2.0.0
Once installation is done. I did rvm list. It shown like below:
一旦安装完成。我做了rvm list。它显示如下:
rvm rubies
jruby-1.6.5.1 [ i386 ]
/home/username/.rvm/scripts/list: line 294: /home/username/.rvm/rubies/rbx-2.0.0/config: No such file or directory
rbx-2.0.0 [ ]
=* ree-1.8.7-2011.12 [ i686 ]
ruby-1.9.3-p0 [ i686 ]
# => - current
# =* - current && default
# * - default
Why did it install Rubinius 2.0-rc1?? did anyone face this issue?? Any help??
为什么安装了Rubinius 2.0-rc1??有人遇到过这个问题吗??有什么帮助吗??
Thanks :)
谢谢 :)
回答by toch
Your rvm is probably not up to date, and by doing so the list of installable rubies also. Rvm probably took the best match, that was Rubinius 2
您的 rvm 可能不是最新的,这样做也会导致可安装的 rubies 列表。Rvm 可能拿下了最好的比赛,那就是 Rubinius 2
When you do
当你做
rvm list known
You obtain the list of known rubies that you can install
您获得可以安装的已知红宝石列表
This list is updated at the same time you update rvm. Then you need to update rvm before installing MRI Ruby 2.0.0
此列表在您更新 rvm 的同时更新。然后你需要在安装 MRI Ruby 2.0.0 之前更新 rvm
rvm get stable
回答by dayanthan
First, make sure you have the latest RVM:
首先,确保您拥有最新的 RVM:
rvm get stable
After installing RVM, run the relevant libyamlinstallation for your system:
安装 RVM 后,libyaml为您的系统运行相关安装:
Debian-based systems:
基于 Debian 的系统:
apt-get install libyaml-dev
Fedora/CentOS/RHEL systems:
Fedora/CentOS/RHEL 系统:
yum install libyaml-devel
Mac with Homebrew:
带有 Homebrew 的 Mac:
brew install libyaml
Lastly:
最后:
rvm pkg install openssl
rvm install 2.0.0 \
--with-openssl-dir=$HOME/.rvm/usr \
--verify-downloads 1
rvm use 2.0.0
回答by RubyMiner
When you do
当你做
rvm list known
You obtain the list of known rubies that you can install
您获得可以安装的已知红宝石列表
This list is updated at the same time you update rvm. Then you need to update rvm before installing MRI Ruby 2.0.0
此列表在您更新 rvm 的同时更新。然后你需要在安装 MRI Ruby 2.0.0 之前更新 rvm
Update rvm to the latest version
将 rvm 更新到最新版本
rvm get stable
Then try installing ruby
然后尝试安装 ruby
rvm install 2.0.0
if there is any error, such as missing packages, it will be listed. Install those packages for debian-based systems using
如果有任何错误,例如缺少包,它将被列出。使用以下命令为基于 debian 的系统安装这些软件包
Use yum install / brew install for Fedora/CentOS/RHEL systems , Mac with Homebrew respectively
Fedora/CentOS/RHEL 系统分别使用 yum install / brew install ,Mac 与 Homebrew 分别使用
apt-get install "your missing packges"
eg:
sudo apt-get install libsigsegv2 gawk libgdbm-dev libffi-dev
once the missing packages are installed.
一旦安装了缺少的软件包。
try installing ruby 2.0.0
尝试安装 ruby 2.0.0
rvm install 2.0.0
回答by nicoyuste
You can do rvm use 2.0.0.
你可以做到rvm use 2.0.0。
If it tells you that you have it not installed, you just do:
如果它告诉您尚未安装它,则只需执行以下操作:
rvm install ruby-2.0.0-p598
rvm install ruby-2.0.0-p598
It will install everything that you need for you and then you can select which version of Ruby to use with rvm use
它将安装您需要的一切,然后您可以选择要使用的 Ruby 版本 rvm use
回答by opsb
There's some good instructions at https://coderwall.com/p/tptocq, includes setting up libyaml and openssl.
https://coderwall.com/p/tptocq 上有一些很好的说明,包括设置 libyaml 和 openssl。

