- Подготвяне на инсталацията
# yum install gcc-c++ patch readline readline-devel zlib zlib-devel
# yum install libyaml-devel libffi-devel openssl-devel make
# yum install bzip2 autoconf automake libtool bison iconv-devel sqlite-devel
- Инсталиране на RVM(Ruby Version Manager)
# curl -sSL https://rvm.io/mpapis.asc | gpg --import -
# curl -L get.rvm.io | bash -s stable
# rvm requirements run
Checking requirements for centos.
Requirements installation successful.
# rvm install 2.4.0
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/16.04/x86_64/ruby-2.4.0.tar.bz2
Checking requirements for ubuntu.
Requirements installation successful.
ruby-2.4.0 - #configure
ruby-2.4.0 - #download
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16.4M 100 16.4M 0 0 724k 0 0:00:23 0:00:23 --:--:-- 790k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.4.0 - #validate archive
ruby-2.4.0 - #extract
ruby-2.4.0 - #validate binary
ruby-2.4.0 - #setup
ruby-2.4.0 - #gemset created /usr/local/rvm/gems/ruby-2.4.0@global
ruby-2.4.0 - #importing gemset /usr/local/rvm/gemsets/global.gems..............................
ruby-2.4.0 - #generating global wrappers........
ruby-2.4.0 - #gemset created /usr/local/rvm/gems/ruby-2.4.0
ruby-2.4.0 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.4.0 - #generating default wrappers........
- Задаване на дефаултна версия на Ruby
# rvm list
rvm rubies
* ruby-2.3.0 [ x86_64 ]
ruby-2.3.3 [ x86_64 ]
=> ruby-2.4.0 [ x86_64 ]
# => - current
# =* - current && default
# * - default
-----
# rvm use 2.4.0 --default
Using /usr/local/rvm/gems/ruby-2.4.0
# ruby --version