Skip to content

Running with jruby complete

Jason R. Clark edited this page Nov 22, 2015 · 1 revision

jruby-complete is a self-contained JAR file with all of JRuby in it. You can run Shoes with this, but there's a few things you might need to tweak.

Installation

First off, you're likely to need to set GEM_HOME per https://github.com/jruby/jruby/issues/2488.

Grab the jruby-complete.jar file from http://jruby.org/download.

When installing the Shoes gems, you'll include the --user-install flag which will write the gems to a local file location.

java -jar jruby-complete-9.0.4.0.jar -S gem install --user-install --pre shoes

Running Shoes

The final issue you might encounter is that you can't use the installed executable from shoes when running with jruby-complete. Thankfully, if you modify your Shoes app to include this line at the top:

require 'shoes'

... then you can execute that file with a command-line like this:

java -jar jruby-complete-9.0.4.0.jar -S ./my-shoes-app.rb

(If you happen to be running on Mac, you'll need to call java -XstartOnFirstThread -jar ... for it to start happily).