個人的なメモ。
default gem以外のすべてのgemを削除する方法。
これまでのやり方では
This file contains 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
gem uninstall -axI `gem list --no-versions` | |
ERROR: While executing gem ... (Gem::InstallError) | |
gem "bigdecimal" cannot be uninstalled because it is a default gem |
ということでエラーになった。
This file contains 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
for i in `gem list --no-versions`; do gem uninstall -aIx $i; done |
default gemをuninstall時にエラーは出るけど、無視されるっぽい。
参考: http://stackoverflow.com/questions/15100496/uninstalling-all-gems-ruby-2-0-0