Skip to content

Instantly share code, notes, and snippets.

@francois
Created October 6, 2020 11:55
Show Gist options
  • Save francois/2dfd9ed91d8078eb143490e3e88d77c7 to your computer and use it in GitHub Desktop.
Save francois/2dfd9ed91d8078eb143490e3e88d77c7 to your computer and use it in GitHub Desktop.
JRuby failure loading ConsoleReporter from metrics-core
[1] pry(main)> RUBY_VERSION
=> "2.5.7"
[2] pry(main)> JRUBY_VERSION
=> "9.2.9.0"
[3] pry(main)> RUBY_ENGINE
=> "jruby"
[4] pry(main)> require "java"
=> true
[5] pry(main)> require "./app/vendor/metrics-core-4.1.12.1.jar"
=> true
[6] pry(main)> registry = com.codahale.metrics.MetricRegistry.new
=> #<Java::ComCodahaleMetrics::MetricRegistry:0x57806346>
[7] pry(main)> com.codahale.metrics.InstrumentedScheduledExecutorService
=> Java::ComCodahaleMetrics::InstrumentedScheduledExecutorService
[8] pry(main)> com.codahale.metrics.ConsoleReporter
NameError: missing class name (`com.codahale.metrics.ConsoleReporter')
from org/jruby/javasupport/JavaPackage.java:252:in `method_missing'
$ jar -t -f app/vendor/metrics-core-4.1.12.1.jar | grep Console
com/codahale/metrics/ConsoleReporter$1.class
com/codahale/metrics/ConsoleReporter$Builder.class
com/codahale/metrics/ConsoleReporter.class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment