From 5a7a5c3eaed2ea9ae1b1586e8825bfe499fe8600 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Fri, 21 Feb 2014 15:43:32 -0800 Subject: [PATCH] Unset GEM_HOME and GEM_PATH before running brew.rb This was reported in Tigerbrew, but is a worthwhile fix everywhere. Fixes mistydemeo/tigerbrew#177. --- bin/brew | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/brew b/bin/brew index 027640677c..fd2d7108db 100755 --- a/bin/brew +++ b/bin/brew @@ -15,6 +15,11 @@ fi BREW_LIBRARY_DIRECTORY=$(cd "$BREW_FILE_DIRECTORY"/../Library && pwd -P) +# Users may have these set, pointing the system Ruby +# at non-system gem paths +unset GEM_HOME +unset GEM_PATH + BREW_SYSTEM=$(uname -s | tr "[:upper:]" "[:lower:]") if [ "$BREW_SYSTEM" = "darwin" ] then