Skip to content

Instantly share code, notes, and snippets.

@dacur
Created June 18, 2014 21:33
Show Gist options
  • Select an option

  • Save dacur/e4f69a28e70c7a0ae0cb to your computer and use it in GitHub Desktop.

Select an option

Save dacur/e4f69a28e70c7a0ae0cb to your computer and use it in GitHub Desktop.
How to kill an instance of rails server that is running. Useful when you get the error message that says that address localhost:3000 is being used somewhere else (i.e. the rails server did not shut down properly). http://stackoverflow.com/questions/4473229/rails-server-says-port-already-used-how-to-kill-that-process
//On any command line:
lsof -wni tp:3000
//You will see a column labeled "PID". Get that number.
kill -9 PID#HERE //e.g. kill -9 704
//If this fails, RESTART machine => has worked before
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment