Skip to content

Instantly share code, notes, and snippets.

@chrismcg
Created September 16, 2011 14:54
Show Gist options
  • Select an option

  • Save chrismcg/1222283 to your computer and use it in GitHub Desktop.

Select an option

Save chrismcg/1222283 to your computer and use it in GitHub Desktop.
For those with rails 2 and rails 3 apps
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