Install Ruby on Ubuntu using Rbenv
11 March 2022 (Updated 11 March 2022)
Install rbenv
Install required packages:
Clone rbenv git repo into $HOME/.rbenv
:
Add rbenv executable to your $PATH
(if not already added to ~/.zshrc
or ~/.bashrc
):
Set up rbenv in your shell (if not already added to ~/.zshrc
):
Add eval "$(rbenv init -)"
to your .zshrc
(if not already added).
Install ruby-build as an rbenv plugin
Create rbenv plugins folder:
Checkout ruby-build git repo:
Install Ruby version using rbenv
Install Ruby version:
Set installed version as default:
You might need to restart the terminal to use the new Ruby version.
Tagged:
Ruby
Thanks for your comment . Once it's approved, it will appear here.
Leave a comment