Skip to content

Instantly share code, notes, and snippets.

@albanpeignier
Created October 6, 2011 08:38
Show Gist options
  • Select an option

  • Save albanpeignier/1266864 to your computer and use it in GitHub Desktop.

Select an option

Save albanpeignier/1266864 to your computer and use it in GitHub Desktop.
Bundle and shell
alias rake='bundle-exec rake'
alias cap='bundle-exec cap'
alias rspec='bundle-exec rspec'
alias rails='bundle-exec rails'
alias cucumber='bundle-exec cucumber'
alias irb='bundle-exec irb'
#!/bin/sh
# From http://tomafro.net/2011/09/tip-automatic-bundle-exec-for-rake-and-more
if [[ -f Gemfile ]]; then
bundle exec $*
else
command $*
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment