async-rack
async-rack copied to clipboard
Server handler (thin) not found.
When I start this simple server, I get an error: Server handler (thin) not found. (RuntimeError)
require 'async-rack'
require 'sinatra'
set :server, 'thin'
get '/' do
"Hello, world!"
end
If I comment out the require 'async-rack' line, it starts Thin fine. If I comment out the set :server, 'thin' and use async-rack, it starts WEBrick.
I don't think sinatra can work out of the box with async-rack. Try https://github.com/ghazel/async_sinatra
async_sinatra has the same issue.
require 'async-rack'
require 'sinatra/async'
class TestServer < Sinatra::Base
register Sinatra::Async
set :server, 'thin'
aget '/' do
body("Hello, world!")
end
end
TestServer.run!