centos安装ruby

安装RVM

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh

rvm list known

rvm install 2.4.1


安装Ruby

ruby -v

gem -v


更换国内镜像

gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
gem sources -l

你可能感兴趣的:(centos安装ruby)