1
0
Fork 0

Abide by Mac conventions when installing gems.

pull/3/head
Sorin Ionescu 13 years ago
parent c2c10f9881
commit 3aa0d3bd66

@ -1,6 +1,16 @@
# TODO: Make this compatible with rvm. # Install local gems according to Mac OS X conventions.
# Run sudo gem on the system ruby, not the active ruby. if [[ "$OSTYPE" == darwin* ]]; then
alias sgem='sudo gem' export GEM_HOME=$HOME/Library/Ruby/Gems/1.8
export PATH=$GEM_HOME/bin:$PATH
# gem is slow; cache its output.
cache_file="${0:h}/cache.zsh"
if [[ ! -f "$cache_file" ]]; then
echo export GEM_PATH=$GEM_HOME:$(gem env gempath) >! "$cache_file"
source "$cache_file"
else
source "$cache_file"
fi
unset cache_file
fi
# Find ruby file
alias rfind='find . -name *.rb | xargs grep -n'

Loading…
Cancel
Save