Last updated January 18, 2011 04:56, by qmxme
JRuby offers a server mode called "nailgun" that helps to offset the pain of starting up a new copy of the JVM for each script. Nailgun starts a copy of JRuby up and listens on a port for future jruby calls thereby bypassing the usual JVM startup cost.
1. Make sure you have nailgun installed.
% cd /path/to/jruby/tool/nailgun % ./configure % make
2. Start the nailgun server in the background.
% jruby --ng-server &
3. To use nailgun for executing your scripts, pass the --ng command line switch.
% jruby --ng myscript.rb





