Skip to content

Instantly share code, notes, and snippets.

@sfate
Forked from tapajos/gist:1433859
Created June 25, 2012 21:56
Show Gist options
  • Save sfate/2991586 to your computer and use it in GitHub Desktop.
Save sfate/2991586 to your computer and use it in GitHub Desktop.
No more 'bundle exec'
# Add this lines into your .bashrc
function rake {
bundle_exec 'rake' $@
}
function rspec {
bundle_exec 'rspec' $@
}
function bundle_exec {
if [ -e Gemfile ]; then
bundle exec $1 $2
else
$(which $1) $2
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment