Ruby-on-rails – Stop rails server –daemon

ruby-on-rails

I know how to start a Rails server with

rails server

But now i started the rails server with daemon. The result is that the server runs in the background and the commandline is accessible. Hoe can I stop this server that is running in the background. So how do I end this code?

rails server --daemon

Best Answer

There's no easy way that I know of, but you should be able to run

kill -9 $(cat tmp/pids/server.pid)