Skip to content

Instantly share code, notes, and snippets.

@kenton
Created January 12, 2012 00:22
Show Gist options
  • Save kenton/1597674 to your computer and use it in GitHub Desktop.
Save kenton/1597674 to your computer and use it in GitHub Desktop.
Shell command to copy all gemsets from one ruby version to another
# you'll need to adjust the names of the source and destination ruby versions
# you may also need to adjust the number of fields that are cut (the -f 7 flag in the cut command) if the output of "rvm gemset list" changes at some point down the road
rvm gemset list | sed 's/^[[:space:]]*//' | cut -d ' ' -f 7 | while read gemset; do rvm gemset copy 1.9.2@$gemset 1.9.3@$gemset; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment