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.
Other services
Rails and Ruby upgrades
Move an old Rails application to current Rails and Ruby step by step, without a rewrite and without stopping feature work. We start with a fixed-price roadmap.
Upgrade roadmap: $1,500
Ruby on Rails development
Small, well-defined Rails work at a fixed price: a first version of a new application, one feature, a fix, or monthly maintenance.
Feature or fix: from $1,000
Code audit and second opinion
An outside review of your Rails codebase, or of a proposal you have been given, written up in plain language so you can decide what to do next.
Second opinion: $500
Spinel: compile Ruby to native binaries
Spinel is Matz's new ahead-of-time compiler: it turns a subset of Ruby into a standalone native binary. We contribute to it, and we can tell you whether your code fits.
Feasibility study: $2,000