If you start a ruby app with the script/server command, what command do you use to stop it?
A:
cat out the following file in your rails tree:
tmp/pids/server.pid
and send any variety of kill command to that pid
or simply execute the following (assuming your tree looks like: /my/rails/app
kill -9 $(cat /my/rails/app/tmp/pids/server.pid)
ennuikiller
2010-08-10 22:24:52
I see, thanks a lot!
Amy
2010-08-10 22:37:38
+1
A:
you may not have a pid file to kill if you are using a server like webrick, but you can get at it with
ps aux | grep ruby
which should show you all your ruby processes, then kill the process running the server
kill x
where x is the process number
note that you will need to be running as the user running the ruby command otherwise sudo is in your future
Jed Schneider
2010-08-10 22:38:35