Slide 1

Slide 1 text

Run a Ruby application as Java jar file • Peter Ramm May 2025

Slide 2

Slide 2 text

Otto Group one.O 2 About Otto Group one.O Fusion to one.O 2025 Parent company Otto Group Locations Dresden, Hamburg, Altenkunstadt, Madrid, Málaga, Valencia, Taipei, Hyderabad Number of employees around 1,000 Management Board Katrin Behrens, Dr. Stefan Borsutzky

Slide 3

Slide 3 text

Software architect / team lead at OSP in Dresden > 30 years of history in IT projects Main focus: • Development of OLTP systems based on Oracle databases • From architecture consulting up to trouble shooting • Performance optimization of existing systems About me Mail: [email protected] Contacts: • Teams • [email protected] • BlueSky

Slide 4

Slide 4 text

Jarbler • Pack an existing Ruby application into a self- starting Java jar file • Based on JRuby • Run Ruby apps without Ruby environment at target machines • Simple use, preconfigured for Rails apps • The project and documentation can be found here: https://github.com/rammpeter/jarbler

Slide 5

Slide 5 text

Jarbler Simple demo without Gem dependencies • Single Ruby file “hugo.rb” to execute • Create empty Gemfile, run > bundle install • Generate config file: > jarble config • Adjust content in file config/jarble.rb • config.executable = 'hugo.rb' • config.includes = ["hugo.rb"] • config.jar_name = 'hugo.jar’ • Create jar file by > jarble • Run app by > java –jar hugo.jar

Slide 6

Slide 6 text

Jarbler Rails demo with default Gem dependencies • Starting with Rails 8.0.2 with Ruby 3.4.4 • Run app by > java –jar hugo.jar fails with Source locally installed gems is ignoring # because it is missing extensions • With Rails 6.1.7.10 and Jruby 9.4.12.1 it will work after minor changes • concurrent-ruby needs to be 1.3.4, Rails fails with 1.3.5 Gemfile needs to be adjusted • Webpacker removed • sassc has native extensions -> sass-rails removed in Gemfile • rails server did not react in production mode known issue, but forgot solution • Demo in development mode will work now

Slide 7

Slide 7 text

Many thanks for your interest Peter Ramm Team Lead Architecture Consulting Contact me via Teams [email protected] BlueSky