From 42fc29e6a897c7a68a4cf6f7d4561adf00607efa Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 9 Feb 2012 12:37:42 -0500 Subject: [PATCH] Unset GEM_HOME if RVM or rbenv are installed. --- plugins/ruby/init.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/ruby/init.zsh b/plugins/ruby/init.zsh index d2ad9d0..f3878f4 100644 --- a/plugins/ruby/init.zsh +++ b/plugins/ruby/init.zsh @@ -16,6 +16,9 @@ fi # Loads RVM into the shell session. if [[ -s "$HOME/.rvm/scripts/rvm" ]]; then + # Let RVM manage the GEM_HOME. + unset GEM_HOME + # Auto adding variable-stored paths to ~ list conflicts with RVM. unsetopt AUTO_NAME_DIRS @@ -25,6 +28,9 @@ fi # Loads rbenv into the shell session. if [[ -s "$HOME/.rbenv/bin/rbenv" ]]; then + # Let rbenv manage the GEM_HOME. + unset GEM_HOME + path=("$HOME/.rbenv/bin" $path) eval "$(rbenv init - zsh)" fi