Created
September 16, 2011 14:54
-
-
Save chrismcg/1222283 to your computer and use it in GitHub Desktop.
For those with rails 2 and rails 3 apps
This file contains hidden or 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
| function console() { | |
| if [[ -x script/console ]]; then | |
| script/console $* | |
| else | |
| bundle exec rails c $* | |
| fi | |
| } | |
| function listener() { | |
| if [[ -f Procfile ]]; then | |
| echo "Starting Foreman" | |
| bundle exec foreman start | |
| else | |
| if [[ -x script/server ]]; then | |
| echo "Starting Rails 2 listener" | |
| script/server $* | |
| else | |
| echo "Starting Rails 3 listener" | |
| bundle exec rails s $* | |
| fi | |
| fi | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment