安裝RVM
curl -sSL https://rvm.io/mpapis.asc | gpg --import - curl -L get.rvm.io | bash -s stable source /etc/profile.d/rvm.sh rvm reload
檢查是否安裝成功
[root@grafana stnet253.github.io]# rvm requirements run Checking requirements for centos. Requirements installation successful.
安裝Ruby 2.4
rvm install 2.4
設定Ruby版本
rvm list
ruby-2.3.5 [ x86_64 ] * ruby-2.4.2 [ x86_64 ] => ruby-2.4.4 [ x86_64 ] # => - current # =* - current && default # * - default After that use rvm command to setup the default ruby version to be used by applications. rvm use 2.4.4 --default
檢查當前版本
[root@grafana stnet253.github.io]# ruby --version ruby 2.4.4p296 (2018-03-28 revision 63013) [x86_64-linux]