-
-
Save matthewrudy/1003927 to your computer and use it in GitHub Desktop.
Does running `bundle exec rake` make you angry. Control your `rage`!
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 characters
#!/usr/bin/env bash | |
# | |
# Usage: rage db:migrate --trace | |
# should work transparently like rake | |
# | |
# if we're in a directory controlled by bundler | |
# we do bundle exec rake | |
if [ -f Gemfile ]; then | |
bundle exec rake $@ | |
# otherwise we use the system / rvm rake | |
else | |
rake $@ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
well, i always use bundle now so for me is simpler to just do: (add to your ~/.alias.setup or ~/.bashrc)
alias rake='bundle exec rake $@'
And just keep typing "rake" as I usually do... it works just fine. (bundle exec looks for "rake" in whatever bundle path and it can't see your alias, which is just for your interactive shell)