Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make the rubygem directory dynamic by getting the ruby version from
ruby, before building the path.
  • Loading branch information
mattfoster committed Jul 29, 2010
1 parent 8bd7015 commit 20f0a8f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion 01_path
@@ -1,11 +1,18 @@
# Print ruby's version number (for adding gems to the path)
function get_ruby_version {
if [[ -x $(which ruby) ]]; then
print $(ruby -e 'puts RUBY_VERSION')
fi
}

# Add some dirs to the path.
pathdirs=(/Library/Frameworks/Python.framework/Versions/Current/bin
/usr/local/ActivePerl-5.10/bin
/usr/local/ActivePerl-5.10/site/bin
/usr/local/bin
/usr/local/git/bin
/usr/local/libexec/git-core
/var/lib/gems/1.8/bin
/var/lib/gems/$(get_ruby_version)/bin
/opt/local/bin
~/bin )

Expand Down

0 comments on commit 20f0a8f

Please sign in to comment.