JRuby 1.5.0 Released: The Best Alternative Ruby Implementation Gets Even Better
Forgetting the de facto "official" Ruby implementations of 1.8.x and 1.9.1/2, JRuby is the fastest and most stable Ruby implementation available and already has 9 years of progress under its belt. JRuby takes a lot of its performance and versatility from running on the Java Virtual Machine (JVM), which has provided JRuby's developers with a solid base from which to optimize how Ruby is implemented.
JRuby 1.5.0's release notes provide the full detail, but essentially the biggest new features are:
- Native launcher for UNIX-based platforms
- Ant support (effectively a Java based built tool, a la
- Rails 3 related fixes
- Updates to the standard library, RubyGems, and RSpec
- ruby-debug is now included
- Significantly improved Windows support (a breath of fresh air for Windows-based Ruby developers used to getting second best in the Ruby world)
- Overall performance improvements
I don't use JRuby in production myself, but everyone I know who does attests to its stability and performance. I've tried a handful of benchmarks on it informally, and it typically gives Ruby 1.9.1 a run for its money (though not always - and it's worth noting that JRuby's 1.9.x support is still new and optionally applied). It's well worth a try as you might need to pull it out of your arsenal one day to meet the requirements on a "Java-only" enterprise project ;-)
Picking up JRuby from its downloads page and getting it running isn't difficult at all, as long as you have a JVM/JRE installed. It comes in both binary and source forms separately for UNIX-esque and Windows environments. Windows users get the bonus of a special "executable + JRE" download for simplified installation.
A far cooler way of installing JRuby, however, is to use RVM (Ruby Version Manager)! With RVM you can install multiple Ruby implementations on your machine without damaging the ones you already have. Creator Wayne E Seguin has already released a new version that supports and installs JRuby 1.5.0. With RVM 0.1.30, installing JRuby 1.5.0 is as easy as:
# rvm install jruby .. wait a minute or two .. # rvm use jruby # ruby -v => jruby 1.5.0 (ruby 1.8.7 patchlevel 249) (2010-05-12 6769999) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_17) [x86_64-java]