First of all, you need to install gem_plugin. The easiest way is to use gem:
jem install -y gem_plugin --no-rdoc --no-riAfter this is done, you can either download Mongrel-support from svn://rubyforge.org/var/svn/jruby-extras/trunk/mongrel-support, and build the extension manually, or you can download it directly here: http://opensource.ologix.com/http11.jar. If you decide to build it yourself, you first need a current version of JRuby from trunk. Check out mongrel-support from the Subversion repository and execute these commands:
cp $JRUBY_HOME/lib/jruby.jar libAfter that you will have a http11.jar-file in lib. Regardless of how you get the http11.jar-file, place it in $JRUBY_HOME/lib/ruby/site_ruby/1.8/. Then you can proceed in a few different ways. You could copy the Mongrel-files from your MRI installation, or you could download Mongrel from version control. Regardless of how, you need to copy mongrel.rb, mutex_fix.rb and the mongrel-directory from Mongrel into $JRUBY_HOME/lib/ruby/site_ruby/1.8/. You can also copy bin/mongrel_rails into $JRUBY_HOME/bin and change the shebang to point to /usr/bin/env jruby. After this, you are good to go with JRuby and Mongrel.