Created
October 23, 2008 22:28
-
-
Save anonymous/19234 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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' | |
# Set up configuration variables, point merb at the right directory | |
Merb.push_path(:public,"#{$glassfish_appRoot}/public") | |
Merb::Config.setup(:merb_root => "#{$glassfish_appRoot}") | |
puts "Path prefix will be #{$root}" | |
Merb.config.path_prefix = "#{$root}" | |
# register the adapter and set the environment | |
Merb::Rack::Adapter.register %w{grizzly}, :GrizzlyMerb | |
Merb.environment = Merb::Config[:environment] | |
Merb.root = Merb::Config[:merb_root] | |
# Set up the server and log stream, supress merb signal trapping | |
Merb.config.adapter = 'grizzly' | |
Merb.config.log_stream = JRuby::Rack::GrizzlyLog.new | |
Merb.disable(:signals) | |
# Start merb | |
Merb::BootLoader.run | |
Then, Merb::Rack::Appliction.new to make new instances and app.call(env) are the only calling into merb that we are doing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment