Update Ruby With rbenv
Update Ruby With rbenv#
Update ruby-build#
If ruby-build is installed as an rbenv plugin:
cd "$(rbenv root)"/plugins/ruby-build
git pull
If installed with Homebrew:
brew update
brew upgrade ruby-build
Install a Ruby Version#
rbenv install --list
rbenv install 3.3.6
rbenv global 3.3.6
ruby -v
Use rbenv local <version> inside a project to write a .ruby-version file for that project.
Reinstall Project Gems#
Each Ruby version has its own gem environment:
gem install bundler
bundle install
Common Build Dependencies#
On Debian or Ubuntu, Ruby builds may need compiler and library headers:
sudo apt-get install build-essential libssl-dev libreadline-dev zlib1g-dev libffi-dev