Skip to content

Instantly share code, notes, and snippets.

@wayneeseguin
Forked from DAddYE/rvm-empty-gems.sh
Created August 2, 2011 13:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wayneeseguin/1120180 to your computer and use it in GitHub Desktop.
Save wayneeseguin/1120180 to your computer and use it in GitHub Desktop.
Fast way to empty global gemset
#!/bin/bash -e
#
# This script will empty all RVM default gemsets in parallel.
#
rubies=($(rvm list strings))
echo "Emptying default gemsets for rubies: ${rubies[*]}";
for ruby in "${rubies[@]}"
do
(
rvm use $ruby;
rvm --force gemset empty;
)&
done
wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment