1. Computing

Installing jRuby With RVM on OS X


4 of 4

Installing jRuby With RVM on OS X

Java startup times are notoriously slow. While this isn't much of a problem for larger applications, server applications, etc, this is a problem for running small scripts from the command line. What would happen instantly on MRI will take several seconds on jRuby because of these startup times. Thankfully, when installed by RVM, jRuby comes with Nailgun, a server that runs in the background an solves this problem.

To start Nailgun, run the command jruby --ng-server. The server will start up, but you won't be returned to the command line. The Nailgun server doesn't send itself to the background, so you'll need to use Bash's job control to do this. There are two ways to do this. Either simply run the command, hit ctrl-z (that's control, not command) and then run th command bg -, or run the command with the & (ampersand) character appended.

  1. About.com
  2. Computing
  3. Ruby
  4. Tutorials
  5. Installing Ruby
  6. Installing jRuby With RVM on OS X

©2014 About.com. All rights reserved.