概要
- Ruby 2.5.0をUbuntu16.04にインストールする
- rbenv使う
- 通常のリポジトリで提供されているのは2.3.0
手順
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
$ git clone https://github.com/sstephenson/ruby-build.git .rbenv/plugins/ruby-build
$ echo 'export PATH="~/.rbenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
$ source ~/.bashrc
$ rbenv install -l
$ sudo apt-get install gcc
$ sudo apt-get install build-essential
$ sudo apt-get install libssl-dev libreadline-dev zlib1g-dev
$ rbenv install 2.5.0
$ rbenv global 2.5.0