Install rbenv and Ruby


Written by Alan Vardy
Tagged with  linux  rbenv  ruby

I don’t use rbenv anymore (I have moved to asdf for the plugins), but these instructions may help someone else.

Install rbenv first from the package manager of your choice.

Configure it for your terminal

echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc

Install the rbenv Ruby plugin

mkdir -p "$(rbenv root)"/plugins
git clone "$(rbenv root)"/plugins/ruby-build

Install Ruby (this does it globally)

rbenv install 2.6.3 --verbose
rbenv global 2.6.3
ruby -v

Related Posts