Switching root user
Install git
$ sudo su -
# yum -y install git
# yum -y install gcc-c++ glibc-headers openssl-devel readline libyaml-devel readline-devel zlib zlib-devel libffi-devel libxml2 libxslt libxml2-devel libxslt-devel sqlite-devel
# git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv
# cp -p /etc/profile /etc/profile.ORG
# diff /etc/profile /etc/profile.ORG
# echo 'export RBENV_ROOT="/usr/local/rbenv"' >> /etc/profile
# echo 'export PATH="${RBENV_ROOT}/bin:${PATH}"' >> /etc/profile
# echo 'eval "$(rbenv init -)"' >> /etc/profile
# source /etc/profile
#su - root
# env | grep RBENV
#rbenv --version
# git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build
# rbenv install -l
Check the version of Ruby that can be installed
# rbenv install -v 0.0.0
The version you want to install
# rbenv rehash
Make the installed Ruby ready for use
# rbenv global 0.0.0 Installed version
Specifying Ruby to use by default
# ruby -v
Check the installed Ruby version
#gem update --system
#gem install nokogiri -- --use-system-libraries
#gem install rails -N
#gem install bundler
#rbenv rehash
Recommended Posts