Created
July 31, 2011 22:25
-
-
Save jacobsimeon/1117289 to your computer and use it in GitHub Desktop.
For some reason, sometimes you just want to delete your gems and start over.
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 list --no-versions`.split("\n").each do |gem| | |
`gem list -d #{gem}`.gsub(/Installed at(.*):.*/).each do |dir| | |
dir = dir.gsub(/Installed at(.*): /,'').gsub("\n", '') | |
system "gem uninstall #{gem} -aIx -i #{dir}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment