This is a memo when installing via the version control tool when installing Ruby. It is explained in the installation on Ubuntu.
$ sudo apt-get update
$ cd
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
$ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
$ echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
$ source ~/.bashrc
Specify the version you like, install it, and specify to use that version.
$ rbenv install -l
$ rbenv install 2.7.1
$ rbenv global 2.3.1
$ gem install bundler
$ rbenv rehash
$ bundle install
Recommended Posts