Last active
November 30, 2017 02:07
-
-
Save parndt/5750490 to your computer and use it in GitHub Desktop.
Rails 2, Rails 3, Rails 4, Hanami Server and Console
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
# Rails 2, 3, 4, and Hanami console | |
function rc { | |
if [ -e "./script/console" ]; then | |
./script/console $@ | |
elif [ -e "./bin/rails" ]; then | |
./bin/rails console $@ | |
elif [ -e "./apps" ]; then | |
hanami console $@ | |
else | |
script/rails console $@ | |
fi | |
} | |
# Rails 2, 3, 4, and Hanami server | |
function rs { | |
if [ -e "./script/server" ]; then | |
./script/server $@ | |
elif [ -e "./bin/rails" ]; then | |
./bin/rails server $@ | |
elif [ -d "./apps" ]; then | |
hanami server | |
else | |
./script/rails server $@ | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment