If you have ever accidentally closed a terminal window which was running your Rails Webrick server and the server continued to run in the background but you need to kill it so you can restart a new instance you can do the following:
1. run the lsof command identifying port 3000 as the target to get the process ID of the rouge Webrick server
lsof -i:3000
2. then use the kill command plus the process ID you got from step 1 and your rouge will be taken care of.
kill process_id
Of course this is just one way to handle it, if anyone has a better way please comment and let the rest of us know. Thanks in advance!
Published by