Reputation: 5953
I have a Rails Thin server running on my iMac. Normally, I ctl-c to stop it. But, my terminal windows got closed and now I'm trying to stop Thin.
I tried this:
$ thin stop
And got this:
no PID found in tmp/pids/thin.pid
But, the PID is tmp/pids/server.pid
I've tried this:
$ thin stop -C tmp/pids/server.pid
But, I get this:
undefined method `each' for 8395:Fixnum (NoMethodError)
Thanks for the help!
Upvotes: 2
Views: 3675
Reputation: 1559
-C
is the parameter for the config file, use -P
(that is capital p) instead.
thin stop -P tmp/pids/server.pid
The thing is, when you start rails with thin as its webserver, e.g.:
rails server
it creates the file tmp/pids/server.pid, not the thin default tmp/pids/thin.pid, that is why you have to specify the correct pid file.
Upvotes: 0
Reputation: 3237
Just look for the current Thin pid:
cat tmp/pids/server.pid
It will give you the current pid like for instance 6458. Then just issue a:
kill -9 6458
Upvotes: 6