Skip to content

Instantly share code, notes, and snippets.

@tjmcewan
Created May 20, 2011 02:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjmcewan/982264 to your computer and use it in GitHub Desktop.
Save tjmcewan/982264 to your computer and use it in GitHub Desktop.
Rails version-agnostic server & console
# Rails 2 and Rails 3 console
function rc {
if [ -e "./script/console" ]; then
./script/console $@
else
rails console $@
fi
}
# Rails 2 and Rails 3 server
function rs {
if [ -e "./script/server" ]; then
./script/server $@
else
rails server $@
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment