Created
March 31, 2011 06:41
-
-
Save sferik/895921 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function for_each_ruby { | |
for ruby in `rvm list strings` | |
do | |
echo "rvm use $ruby; $1;" | |
done | |
} | |
default_gems=`cat ~/.rvm/gemsets/default.gems | tr '\n' ' '` | |
alias install_default_gems=`for_each_ruby "yes | gem install $default_gems"` | |
alias update_all_gems=`for_each_ruby "yes | gem update; yes | gem cleanup"` |
See my fork for another approach. The rvm exec
command will run the supplied command against all installed rubies.
All of the gem commands you're using, except gem cleanup
, accept the -f
flag to force them so no need to pipe in yes
into those.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The general problems I'm trying to solve are: