Skip to content

Instantly share code, notes, and snippets.

function r() {
if [[ "g|generate|c|console|s|server|db|dbconsole|new" =~ $1 ]]; then
if [ -x script/rails ]; then
script/rails $@
else
bundle exec rails $@
fi
else
if [ -x script/rake ]; then
script/rake $@
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi