Permalink
Browse files

Fix gem_uninstall_all for rbenv

  • Loading branch information...
1 parent 04e2470 commit e6369a55d73d3e3f66cc17b9e47fb1e57383fb02 @naoty committed Mar 30, 2013
Showing with 6 additions and 2 deletions.
  1. +6 −2 gem_uninstall_all
View
@@ -1,3 +1,7 @@
-#!/bin/sh
+#!/usr/bin/env ruby
-gem list --no-versions | xargs gem uninstall -a
+gem_list = `gem list --no-versions`
+gem_list.each_line do |line|
+ next if line.empty? || /LOCAL GEMS/ =~ line
+ system "gem uninstall -axI #{line}"
+end

0 comments on commit e6369a5

Please sign in to comment.