- 以下を実行。それぞれ何してるかは割愛します。
sudo apt-get update
sudo apt install git
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
mkdir -p "$(rbenv root)"/plugins
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
sudo apt install build-essential
sudo apt-get install -y libssl-dev libreadline-dev zlib1g-dev
rbenv install --list
rbenv install 2.7.2