开发者

stopping thin throws an error

I am running a little Sinatra app inside EventMachine, with an EM.WebSocket too.

I have setup thin to run my app, but when I execute the command to stop thin, an error is thrown. I was wondeering if anyone could assist me on cleaning that up, based on the small trace here...

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


I reckon this is related to how you're starting up your Sinatra app. If you see the following in your config.ru:

YourApp.run! :port => 4567

Then you can change it to:

run YourApp

Which seems to avoid the error on shutdown.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜