Skip to content

Commit

Permalink
RubyGems GEM_PATH is not necessary to export.
Browse files Browse the repository at this point in the history
  • Loading branch information
sorin-ionescu committed Jan 24, 2012
1 parent 7849948 commit fadea4f
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions plugins/ruby/init.zsh
Expand Up @@ -3,21 +3,8 @@ if [[ "$OSTYPE" == darwin* ]]; then
export GEM_HOME=$HOME/Library/Ruby/Gems/1.8
path=("$GEM_HOME/bin" $path)

# gem is slow; cache its output.
cache_file="${0:h}/cache.zsh"
if [[ ! -f "$cache_file" ]]; then
print export GEM_PATH=$GEM_HOME:$(gem env gempath) >! "$cache_file"
source "$cache_file"
else
source "$cache_file"
fi
unset cache_file

# Set environment variables for launchd processes.
for env_var in GEM_PATH GEM_HOME; do
launchctl setenv "$env_var" "${(P)env_var}" &!
done
unset env_var
launchctl setenv GEM_HOME "$GEM_HOME" &!
fi

# Loads RVM into the shell session.
Expand Down

0 comments on commit fadea4f

Please sign in to comment.