停止瘦会抛出错误

时间:2011-01-28 16:59:33

标签: rvm websocket eventmachine thin

我在EventMachine中运行一个小型的Sinatra应用程序,也有一个EM.WebSocket。

我已经设置了瘦身来运行我的应用程序,但是当我执行命令停止瘦身时,会抛出错误。我很遗憾,如果有人能帮助我清理它,基于这里的小痕迹......

sudo service thin stop
[stop] /etc/thin/foobaz.yml ...
Stopping server on 0.0.0.0:80 ... 
Sending QUIT signal to process 18889 ... 
>> Exiting!
/usr/local/rvm/gems/ree-1.8.7-2010.02/gems/thin-1.2.7/lib/thin/server.rb:147:in `start': app required (ArgumentError)
 from /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/thin-1.2.7/lib/thin/controllers/controller.rb:80:in `start'
 from /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/thin-1.2.7/lib/thin/runner.rb:177:in `send'
 from /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/thin-1.2.7/lib/thin/runner.rb:177:in `run_command'
 from /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/thin-1.2.7/lib/thin/runner.rb:143:in `run!'
 from /usr/local/rvm/gems/ree-1.8.7-2010.02/gems/thin-1.2.7/bin/thin:6
 from /usr/local/rvm/gems/ree-1.8.7-2010.02/bin/thin:19:in `load'
 from /usr/local/rvm/gems/ree-1.8.7-2010.02/bin/thin:19

1 个答案:

答案 0 :(得分:0)

我认为这与你如何启动Sinatra应用程序有关。如果您在config.ru中看到以下内容:

YourApp.run! :port => 4567

然后您可以将其更改为:

run YourApp

这似乎可以避免关机时的错误。