I'd like to run a Sinatra extension in glassfish, but I can't figure out how to get it to load grizzly in this configuration.
---The config.ru---
require 'rubygems'
require 'myapp'
MyApp.run!
---myapp.rb---
require 'rubygems'
require 'sinatra/base'
class MyApp < Sinatra::Base
set :server, 'grizzly'
get "/" do
"ok"
end
end
--The error---
After starting (jruby -S glassfish -l), I get:
Sep 17, 2009 12:37:47 PM com.sun.grizzly.jruby.rack.RackApplicationPoolAdapter initializeObject
SEVERE: Server handler (grizzly) not found.
This error means the following Sinatra line is failing:
return Rack::Handler.get(server_name.downcase)
and this is due to a Rack::Handler NameError:
'wrong constant name grizzly'
|