Skip to content

Instantly share code, notes, and snippets.

@brucebentley
Created January 3, 2020 15:56
Show Gist options
  • Save brucebentley/8cd91789dcb38b6de58b5c194ddd7e5d to your computer and use it in GitHub Desktop.
Save brucebentley/8cd91789dcb38b6de58b5c194ddd7e5d to your computer and use it in GitHub Desktop.
Update all of your Rubygems for each version of Ruby installed using rbenv.
#! /usr/bin/env bash
set -e
eval "$(rbenv init -)"
for version in `rbenv whence gem`; do
rbenv shell "$version"
echo "Updating rubygems for $version"
gem update --system --no-document --quiet
echo ""
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment