HASH32 Engineering

Update rbenv ruby-build install list

February 25, 2018 | 1 Minute Read

rbenv uses ruby-build plugin to manage the list of ruby versions that can be installed using it. I always end up searching how to update rbenv’s list of rubies, as there is no command to self update yet.

Updating the ruby-build plugin

ruby-build plugin is just a git repository at https://github.com/rbenv/ruby-build. The answer to update to the latest version is just to take a git pull.

cd ~/.rbenv/plugins/ruby-build
git pull origin master

Handy update alias

You can also create a zsh function and add it to your .zshrc file.

function rbenv-update() {
  present_dir=$(pwd)
  cd ~/.rbenv/plugins/ruby-build
  git pull origin master
  cd $present_dir
}

Dont forget to source ~/.zshrc if you want the function available in the current shell.

rbenv-update in zsh

Subscribe to our Newsletter

Never miss a post. Get stories like the directly to your inbox.
Tips and tricks, news about tech tools, recent blog entries and exclusive email only stories.