Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server handler (thin) not found. #4

Open
ghazel opened this issue Jun 23, 2011 · 2 comments
Open

Server handler (thin) not found. #4

ghazel opened this issue Jun 23, 2011 · 2 comments

Comments

@ghazel
Copy link

ghazel commented Jun 23, 2011

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.

@aq1018
Copy link

aq1018 commented Jun 24, 2011

I don't think sinatra can work out of the box with async-rack. Try https://github.com/ghazel/async_sinatra

@ghazel
Copy link
Author

ghazel commented Jun 24, 2011

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants