JRuby 10 released with jump to Ruby 3.4, Java 21, despite loss of Red Hat sponsorship

JRuby 10 released with jump to Ruby 3.4, Java 21, despite loss of Red Hat sponsorship

The team behind JRuby has released version 10 with a jump compatibility to Ruby 3.4, a minimum Java version of 21, full optimization by default, and faster startup.

JRuby is an implementation of the Ruby language on the JVM (Java Virtual Machine). The previous version was compatible with Ruby 3.1, released at the end of 2021, making it out of date with current Ruby features. JRuby 9.x had also maintained compatibility with Java 8, limiting its capabilities.

By contrast, JRuby 10 requires Java 21 or higher and is compatible with Ruby 3.4, released in December 2024. It is a huge jump, and according to core team member Charles Nutter is “our most important release ever.”

Performance and start-up time are two big issues for JRuby users. JRuby uses a Java feature called invokedynamic which, says Nutter, is critical for performance; however in previous versions this was only used by default for simple Ruby operations because it extends startup time. Users could enable it on all code with a flag. In JRuby 10, invokedynamic is on by default, though it can be disabled during development and testing.

Startup time, described as the “number one complaint from JRuby users,” is being addressed in other ways. The move to Java 21 enables use of pre-cached code using Java’s Application Class Data Store (ACDS) which caches code, halving startup time according to Nutter. There is also the experimental Project CRaC which uses a snapshot of a previously running image, and the work in progress Project Leyden for ahead-of-time compilation and profiling, both of which have potential for further improving startup.

Rails, the popular web application framework for Ruby, is supported by JRuby but only up to version 7.1. “Work is ongoing to support Rails 8,” says Nutter, with the hope of a release this summer.

Another reason for caution is that Ruby 3.4 compatibility is partial. “Most features of Ruby 3.2, 3.3, 3.4 are complete, but some are still in progress,” according to the release post.

Despite some limitations, the ability to run Ruby on the JVM has some compelling advantages. Enterprises may be more comfortable with running on the JVM rather than installing Ruby itself. Another factor is that it is easy to call into other JVM languages including Java, Scala, Clojure and Kotlin. Given the huge number of Java libraries available, as well as business applications written in the language, this is a substantial benefit. 

JRuby development has been impacted by Red Hat ceasing its support in July 2024, at which point Nutter left the company, stating that “by the end of this month there will be no salaried employees dedicated to JRuby.” The project is now dependent on other sponsors, without which it could once again fall behind.