Last active
December 31, 2015 19:09
Revisions
-
aaronfeng revised this gist
Dec 18, 2013 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,8 +12,6 @@ function ruby_wrapper() { unalias ruby CURRENT_RUBY=$(which ruby) if [ -e "$(pwd)/Gemfile.lock" ] then bundle exec $CURRENT_RUBY "$@" -
aaronfeng created this gist
Dec 18, 2013 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ #!/bin/bash # remember original ruby location export CURRENT_RUBY=$(which ruby) alias ruby="ruby_wrapper" # call bundle exec if there's a Gemfile.lock function ruby_wrapper() { # unalias it to get the real ruby version # this is require if ruby was switch via rvm or rbenv unalias ruby CURRENT_RUBY=$(which ruby) echo $CURRENT_RUBY if [ -e "$(pwd)/Gemfile.lock" ] then bundle exec $CURRENT_RUBY "$@" else $CURRENT_RUBY "$@" fi # set the alias back for next interception alias ruby="ruby_wrapper" }