浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

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.

Build Status

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.

posted on 2012-03-14 23:20  lexus  阅读(255)  评论(0编辑  收藏  举报