I am cleaning up my Rails development environment, I will be stopping using system gems for all development, I am now officially a Rails 3 convert I believe Bundler is the way to go forward
gem list --local
I have hundreds of gems
sudo gem cleanup
still have many gems uninstalled
tried
gem list --local | cut -d " " -f1 | xargs sudo gem uninstall -a -I
realised I have gems in 3 locations
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
/Library/Ruby/Gems/1.8
/Users/senthil/.gem/ruby/1.8
what at last worked,
gem list --local | cut -d " " -f1 | xargs sudo gem uninstall --install-dir /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
gem list --local | cut -d " " -f1 | xargs sudo gem uninstall -a --install-dir /Library/Ruby/Gems/1.8
gem list --local | cut -d " " -f1 | xargs sudo gem uninstall -a --install-dir /Users/senthil/.gem/ruby/1.8
repeat, rinse, after couple of times I have a clean system gem free world
I am also moving the primary development to rvm, I would now have lot more choice for my development and testing , mri1.8.7, mri1.9.2, rubinius, jruby, macruby