asciidoctorj icon indicating copy to clipboard operation
asciidoctorj copied to clipboard

README instructions for WildFly don't work

Open heruan opened this issue 7 years ago • 3 comments

I've followed the README instruction on how to deal with WildFly (version 12 in my case), but I still get this exception:

org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- asciidoctor
	at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1040)
	at RUBY.require(/opt/wildfly/modules/org/asciidoctor/main/jruby-complete-1.7.26.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54)
	at RUBY.(root)(<script>:12)

This is using the versions specified in the README, i.e.

  • asciidoctorj: 1.5.6
  • jcommander: 1.35 (seems very old)
  • jruby-complete: 1.7.26

Strangely enough, if I downgrade jruby-complete to version 1.7.21 the exception disappears and all seems to work. But I see AsciidoctorJ 1.5.6 does depend on the versions in the README, so I doubt my workaround being safe for production.

Why that exception gets thrown? I guess something changed between JRuby 1.7.21 and 1.7.22 is causing this, but I have no clue how to find it out.

heruan avatar May 10 '18 14:05 heruan

I'd recommend upgrading to jruby 9.1.8.0. Support for 1.7.x will deprecated with the next release. Does this also fail with 9.1.8.0 or higher?

abelsromero avatar May 10 '18 15:05 abelsromero

I didn't try to change the major version to avoid breaking changes, but indeed with the latest 9.1.17.0 it seems to work! Maybe then it's just a matter of updating the docs.

P.S. Also tried to update JCommander to 1.72 and I didn't experience any issue.

heruan avatar May 10 '18 16:05 heruan

I didn't try to change the major version to avoid breaking changes, but indeed with the latest 9.1.17.0 it seems to work! Maybe then it's just a matter of updating the docs.

jRuby is the runtime that runs the underlying Ruby Asciidoctor core. It is a non-written goal to keep compatibility with a wide range of versions, but it's always advisable to use the most recent one. Specially if you want to add extensions and converters to the mix.

P.S. Also tried to update JCommander to 1.72 and I didn't experience any issue.

JCommander is for the cli interface. @robertpanzer do we really need to keep it in the Wildfly docs?

abelsromero avatar May 10 '18 17:05 abelsromero