Ubuntu 20.04 summarizes the minimum steps to set up a Ruby environment with rbenv.
--Immediately after installing Ubuntu 20.04 --The shell is Bash --Internet connection environment
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="~/.rbenv/bin:$PATH"' >> ~/.bashrc
~/.rbenv/bin/rbenv init >> ~/.bashrc
source ~/.bashrc
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
apt install -y build-essential libssl-dev zlib1g-dev
rbenv install 2.7.1
rbenv global 2.7.1
The rbenv itself also needs to be updated. You can do it with one liner.
(cd "$(rbenv root)" ; git pull ; cd "$(rbenv root)"/plugins/ruby-build ; git pull)
I am considering graduating from WLinux.
EoT
Recommended Posts