Uninstalling and reinstalling all ruby gems

sudo gem list | cut -d" " -f1 > gem_list.txt
cat gem_list.txt | xargs sudo gem uninstall -aIx
cat gem_list.txt | xargs sudo gem install

This is useful if you ever want to just reset your gems and clean them up. Or if you upgrade to Snow Leopard and want to make sure all your native gems are in decent shape (since Snow Leopard is 64-bit).

Posted

1 comment

Jan 10, 2010
ThinkBohemian said...
Wish I had seen this before I wiped my snow-leopard install... http://bit.ly/4DRa0V

Leave a comment...