JRuby-Rack

jruby/jruby-rack

JRuby-Rack

JRuby-Rack is a lightweight adapter for the Java servlet environment
that allows any Rack-based application to run unmodified in a Java
servlet container. JRuby-Rack supports Rails, Merb, as well as any
Rack-compatible Ruby web framework.

For more information on Rack, visit http://rack.rubyforge.org.

Getting Started

The easiest way to use JRuby-Rack is to get Warbler. Warbler
depends on the latest version of JRuby-Rack and ensures it gets placed in
your WAR file when it gets built.

If you're assembling your own WAR using other means, you can install the
jruby-rack gem. It provides a method to locate the jruby-rack jar file:

require 'fileutils'
require 'jruby-rack'
FileUtils.cp JRubyJars.jruby_rack_jar_path, '.'

Otherwise you'll need to download the latest JRuby-Rack jar, drop
it into the WEB-INF/lib directory and configure the RackFilter in your
application's web.xml. Example web.xml snippets are as follows.

For Rails

Here's sample web.xml configuration for Rails. Note the environment
and min/max runtime parameters. For multi-threaded Rails with a single
runtime, set min/max both to 1. Otherwise, define the size of the
runtime pool as you wish.

你可能感兴趣的:(jruby)