安装rbenv / Install rbenv

cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
source ~/.bash_profile

安装Ruby / Install Ruby

sudo apt-get install -y libreadline-dev
rbenv install 2.5.3
rbenv -v
cd PROJECT_PATH
rbenv local 2.5.3
ruby -v
gem install bundler -v '1.17.3'

参考资料 Referencs