Virtual Machine • Ruby implementation fi rst, JVM language second • Many bene fi ts from JVM ecosystem • Ruby code should "just work" • Try your code, your library • If something doesn't work, let us know!
3.4 • Language and core specs: 98% passing • Pure-Ruby standard library shared with CRuby • JRuby support for most native stdlib • JRuby 10.1 supports Ruby 4.0 • Leading edge, more experimental changes
JVM language • Extensions are written in Java, not insecure C code • JVM can optimize Ruby code just like Java • JVM garbage collector is concurrent and ef fi cient • We write Java so you don't have to! • But you can if you want to! (or Scala, Clojure, Kotlin...)
hundreds of thousands of libraries • Graphics, GUIs, servers, document formats, ML/AI/LLM • One of the largest collections in the dev world • All available to JRuby users! • Easy integration into Ruby apps and code • "Magic" to make Java APIs look like Ruby
apps • New dev, migrations, upgrades • Bug prioritization, security SLAs • Help with your code under NDA • Optimizing Ruby libraries • Using JVM tools to improve perf • headius.com/welcome
for Java • java in PATH is fi ne • Recommend setting JAVA_HOME $ java -version openjdk version "25" 2025-09-16 LTS OpenJDK Runtime Environment Zulu25.28+85-CA (build 25+36-LTS) OpenJDK 64-Bit Server VM Zulu25.28+85-CA (build 25+36-LTS, mixed mode, sharing) $
JVM apps • Monitor memory/heap, CPU usage, threads, and other details • The "MBeans" tab provides JVM and app-speci fi c tools • Run JRuby with --manage for JRuby tools • Try starting jconsole and connecting to your JRuby app
ling for JVM • Less than 1% overhead for monitoring • Less than 2% overhead for basic pro fi ling • "Almost unnoticeable" • Enable at command line or let JDK Mission Control enable it
Ruby • Whatever you use today probably works fi ne • The JVM world provides other ways to deploy apps • "Executable" Java Archive (JAR) fi les that need only a JDK • Web Application Archive (WAR) fi les to deploy on an app server
in java.lang.System has been called WARNING: java.lang.System::load has been called by com.kenai.jffi.internal.StubLoader in an unnamed module (file:/var/folders/ 5n/y5_kd6x94rndnyjh4519bp2w0000gn/T/jruby15925531817024339324extract/jruby- core-10.0.5.0-complete.jar) WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module WARNING: Restricted methods will be blocked in a future release unless native access is enabled Hello, world! [] warbler $
(Rails 1.x) • ActiveRecord is the only part that needs JRuby-speci fi c logic • Native adapters replaced with Java's JDBC API • The rest of Rails generally just works • Rails on JRuby can scale much better due to threads
7.2: Use "rails new --skip-bundle" and tweak Gem fi le • Rails 8.0-8.1 • Use template from workshop repo or https://jruby.org/rails/8.0.rb • Pass `--skip-kamal` due to an unsupported dependency
binstubs • core/src/main/java - Java sources of JRuby core • core/src/main/ruby - Ruby sources of JRuby core • lib/jruby.jar - the built JRuby core jar • lib/ruby/stdlib - Ruby core stdlib • lib/ruby/gems/shared/gems - Ruby gem home • test and spec - many, many test suites