Skip to content

Instantly share code, notes, and snippets.

@Brantron
Last active August 29, 2018 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Brantron/494a28d17b7d4b4e9f1ac8f3b400d34c to your computer and use it in GitHub Desktop.
Save Brantron/494a28d17b7d4b4e9f1ac8f3b400d34c to your computer and use it in GitHub Desktop.
Kill rails process on Mac from command line
Put this functionin your ~/.bash_profile
function krails() {
lsof -i tcp:3000 | awk -v N=2 '{print $N}' | tail -n -2 | xargs -L1 kill -9
}
then from the terminal reload with `source ~/.bash_profile` and you can run `krails` anytime in the terminal to kill all rails processes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment