Skip to content

Instantly share code, notes, and snippets.

@jacobsimeon
Created July 31, 2011 22:25
Show Gist options
  • Save jacobsimeon/1117289 to your computer and use it in GitHub Desktop.
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.
`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