Skip to content

Instantly share code, notes, and snippets.

Created September 11, 2009 19:08
Show Gist options
  • Save anonymous/185512 to your computer and use it in GitHub Desktop.
Save anonymous/185512 to your computer and use it in GitHub Desktop.
1. I startup via jruby -S glassfish -l
2. I get this error:
SEVERE: undefined method `disable' for main:Object from <script>:1
com.sun.grizzly.jruby.rack.RackInitializationException: undefined
method `disable' for main:Object from <script>:1
3.I these 2 files below in my cwd.
--- config.ru ---
require 'rubygems'
gem 'sinatra', '>=0'
require 'rack/handler/grizzly'
require 'myapp'
PATH = 'myapp.rb'
set :server, 'grizzly'
set :app_file, PATH
set :adapter, 'grizzly'
MyApp.run # was Sinatra.run b4subclass
$grizzly_rack_app
-- myapp.rb ---
require 'rubygems'
require 'sinatra/base' # was 'sinatra' b4 run
class MyApp < Sinatra::Base
get "/" do
'Hello world!'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment