Skip to content

Instantly share code, notes, and snippets.

@wycats
Forked from anonymous/gist:19234
Created October 23, 2008 22:33
Show Gist options
  • Save wycats/19238 to your computer and use it in GitHub Desktop.
Save wycats/19238 to your computer and use it in GitHub Desktop.
#load required files
require 'rubygems'
gem 'merb-core', '>= 0'
require 'merb-core'
require 'rack/handler/grizzly'
require 'rack/adapter/merb'
require 'jruby/rack/grizzly_helper'
Merb::Rack::Adapter.register %w{grizzly}, :GrizzlyMerb
# Set up configuration variables, point merb at the right directory
Merb::Config.use do |c|
c[:merb_root] = $glassfish_appRoot
c[:path_prefix] = $root
c[:adapter] = "grizzly"
c[:log_stream] = JRuby::Rack::GrizzlyLog.new
end
# Set up the server and log stream, supress merb signal trapping
Merb.disable(:signals)
# Start merb
Merb::BootLoader.run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment