Last Updated: February 25, 2016
· piermariacosina

How to stop a Daemon Server in Rails?

If when you try to run
rails s
you get this kind of error
2012-11-19 08:37:53] WARN TCPServer Error: Address already in use - bind(2)

so you have a Daemon server running in this case you can kill it using the following combo
$ lsof -wni tcp:3000
to get the list of processes running in background
$ kill -9 PID
to kill the process using it's PID

3 Responses
Add your response

Thanks! That's a great tip, and exactly what I was looking for.

over 1 year ago ·

cool. tcp:3000 is what i was missing.

over 1 year ago ·

Ps -ef | grep ruby

Will also give u the process executing that. Then you can use kill -9 PId

over 1 year ago ·