Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CentOS 安装 Ruby 2.3.0 #33

johnnian opened this issue Sep 7, 2017 · 0 comments


1 participant
Copy link

commented Sep 7, 2017

Ruby 安装方法——RVM

操作系统: CentOS 6.5

说明:在CentOS上,直接用 yum 安装 Ruby的话,安装的版本比较低,所以,就直接用 RVM 进行安装。

步骤1: 安装依赖包

# yum install gcc-c++ patch readline readline-devel zlib zlib-devel -y
# yum install libyaml-devel libffi-devel openssl-devel make -y
# yum install bzip2 autoconf automake libtool bison iconv-devel sqlite-devel -y

步骤2: 安装 RVM

# curl -sSL | gpg --import -
# curl -L | bash -s stable
# source /etc/profile.d/
# rvm reload

步骤3: 验证环境依赖

# rvm requirements run

Checking requirements for centos.
Requirements installation successful.

步骤4: 安装 Ruby

直接从原始的 Ruby源下载,速度很慢,所以,需要切换成淘宝的镜像源:

# echo "ruby_url=" > $rvm_path/config/db


# rvm requirements
# rvm install 2.3.0
# rvm use 2.3.0 --default --create

验证是否安装成功, 切换 gem源

# ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

# gem -v

# gem sources --add --remove added to sources removed from sources

@johnnian johnnian added this to Linux工具 in 开发工具 Sep 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.