I am running my rails application using the following
$script/server -d webrick
on my Ubuntu system , above command run the webrick s
In your terminal to find out the process id (PID):
$ lsof -wni tcp:3000
Then, use the number in the PID column to kill the process:
$ kill -9