简体   繁体   中英

Sinatra-synchrony detect_rack_handler not found

I'm attempting to run Sinatra with the sinatra-synchrony mod. backed up by Thin.

Code:

require 'sinatra'
require 'sinatra/synchrony'

Causes an immediate error:

/var/lib/gems/1.9.1/gems/sinatra-1.2.6/lib/sinatra/base.rb:1290:in `detect_rack_handler': Server handler (thin,mongrel,webrick) not found. (RuntimeError)
    from /var/lib/gems/1.9.1/gems/sinatra-1.2.6/lib/sinatra/base.rb:1230:in `run!'
    from /var/lib/gems/1.9.1/gems/sinatra-1.2.6/lib/sinatra/main.rb:25:in `block in <module:Sinatra>

My setup

  • ruby 1.9.2p0
  • thin 1.2.11
  • sinatra: 1.2.6
  • sinatra-synchrony: 0.2.0

I have pushed 0.2.1, which resolves this issue. Basically there's a constant that wasn't being defined correctly in the async-rack code. Since async-rack was primarily just being used to fix a dumb logging issue, I've removed it for now. Perhaps in the future I will fix the logging by extracting the part of async-rack that actually fixes this. For now I'm going to just pull the code out. So try 0.2.1 and see if that resolves it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM