How to Kill a WEBrick Daemon

December 12, 2010

This was quite possibly the most annoying thing in the world to do.  Can't have that last 30 minutes of my life back, so hopefully this will save YOU time!

So, I inadvertently fired up the WEBrick server as a daemon.  Now I need to kill that process so I can start WEBrick in debugger mode.  To find the PID run this command in your terminal:

ps aux | grep ruby

So, the PID is the first number (20435) after the username:

dougyoder 20435   0.1  0.8  2495852  35500   ??  S     4:58PM   0:03.48 /Users/dougyoder/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails server -debugger

Now that we have the PID we KILL IT!!!

kill -9 20435

Please, don't forget the -9...that's the key.

  • doug
  • December 12, 2010

Forgot to mention I'm running the latest version of Snow Leopard.

@drydevelopment