Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
binstubs light (hack)
# binstubs light
function bundle_exec {
bundler=`bundle list 2>&1`
cmd=$1
shift
if [[ $bundler == "" || $bundler =~ "Could not locate Gemfile" ]]
then
command="$cmd $@"
else
command="bundle exec $cmd $@"
fi
$command
}
alias cap='bundle exec cap'
alias pry='bundle_exec pry'
alias capify='bundle exec capify'
alias ruby='bundle_exec ruby'
alias rake='bundle_exec rake'
alias unicorn='bundle_exec unicorn'
alias rails='bundle_exec rails'
alias guard='bundle_exec guard'
alias spork='bundle_exec spork'
alias yard='bundle_exec yard'
alias rspec='bundle_exec rspec'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.