我的iMac上运行着一台Rails瘦服务器。通常,我会按ctl-c组合键来停止它。但是,我的终端窗口被关闭了,现在我试图阻止瘦。
我试过这个:
$ thin stop结果是这样的:
no PID found in tmp/pids/thin.pid但是,PID是tmp/PID/server.pid
我试过了:
$ thin stop -C tmp/pids/server.pid但是,我得到了这个:
undefined method `each' for 8395:Fixnum (NoMethodError)谢谢你的帮助!
发布于 2013-05-10 07:29:49
只需查找当前的瘦pid:
cat tmp/pids/server.pid它将为您提供当前的pid,例如6458。然后只需发出一条:
kill -9 6458发布于 2013-05-10 06:42:10
也许可以试试这个:kill -9 thin_pid
发布于 2016-10-28 16:58:29
-C是配置文件的参数,请改用-P (即大写p)。
thin stop -P tmp/pids/server.pid 问题是,当您使用thin作为其when服务器启动rails时,例如:
rails server它会创建文件tmp/pids/server.pid,,而不是精简的默认tmp/pids/thin.pid,,这就是为什么您必须指定正确的pid文件。
https://stackoverflow.com/questions/16472230
复制相似问题