JRuby and Java integration

Run Rails on the JVM, call Java libraries from Ruby, or embed Ruby in a Java system. We contribute to JRuby itself, so we can fix the problem where it starts.

When JRuby is the right choice

JRuby is Ruby on the Java virtual machine. It runs Rails, and it can call any Java library directly. Teams pick it when:

  • The company runs on the JVM. Operations already know how to deploy, monitor and tune Java applications, and a CRuby server would be the odd one out.
  • They need a Java library. PDF generation, a vendor SDK, a legacy internal system: with JRuby, Ruby code calls it as if it were a Ruby object.
  • They need parallel threads. JRuby has no global VM lock, so threads run on all cores at once.
  • They embed Ruby in a Java product for scripting or configuration.

What we do

  • Assess whether your Rails application can move to JRuby and what it will cost
  • Migrate it: replace native extensions, fix thread-safety problems, set up the JVM build and deployment
  • Integrate Ruby and Java code in either direction
  • Fix JRuby when the bug is in JRuby, and get the fix merged upstream so you do not carry a patch

JRuby work we have done

Sampo Kuokkanen has merged 35 pull requests into JRuby. Recent ones include fixes to the fiber scheduler IO path, IO#wait, Fiber#transfer and Fiber#raise, a Mutex deadlock caused by not tracking which fiber owned the lock, and zero-size IO::Buffer support. He also works on ruby/spec, the shared test suite that tells JRuby how CRuby behaves, and spoke about it at COSCUP 2026 in Ruby on Ruby: ruby/spec, MRI tests, JRuby, and living on the edge.

Pricing

Prices in US dollars, before tax. A price marked "from" is the minimum; we agree a fixed price before we start, and invoices in yen are fine.

JRuby assessment

from $2,000

fixed price, about one week

We run your application and test suite on JRuby, list what breaks (native extensions, threading assumptions, gems without a Java version) and estimate the work to fix it.

JRuby and Java work

Fixed quote

after the assessment

Migrations to JRuby, Java interop, performance work on the JVM, and fixes in JRuby itself, sent upstream.

Frequently Asked Questions

Why would we run Rails on JRuby?
Usually for one of three reasons: your company already runs everything on the JVM and wants one deployment platform; you need a Java library that has no Ruby equivalent; or you want real parallel threads, which JRuby has and CRuby does not.
Does every gem work on JRuby?
Pure-Ruby gems almost always do. Gems with C extensions need a Java version or a replacement, and a few have none. The assessment lists each one and what to do about it.
What if the problem is a bug in JRuby?
Then we fix it in JRuby and send the fix upstream. Sampo Kuokkanen has had 35 pull requests merged into JRuby, recently mostly in fibers, IO and the fiber scheduler.
Do you also do plain Java work?
Only where it meets Ruby: Java libraries wrapped for Ruby callers, Ruby scripting embedded in a Java application, and JVM tuning for JRuby deployments.

Tell us about your project

Send a few lines about your application and what you need. We reply within two business days, in English or Japanese, with next steps and a rough estimate.