Closed ysb33r closed 5 years ago
I think the issue is with JRuby and not with Asciidoctor. I haven't downloaded JRuby 9.0.5.0 but jruby-complete-9.1.8.0.jar includes a SnakeYAML jar which is being ignored by JRuby. Putting SnakeYAML 1.19 in my classpath worked until I tried to upgrade a Spring Boot 2.0.2.RELEASE project to 2.1.2.RELEASE which uses SnakeYAML 1.23. At that point, I received a strange error myself:
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1:in `require': It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby.
For what it's worth, I upgrade my dependencies to asciidoctorj 1.6.0 and asciidoctorj-pdf 1.5.0-alpha.16 which use SnakeYAML 1.23 and received a different error, but I don't think that issue is in the scope of this ticket. Even if I received no errors, I had to do the same workaround as you did.
@ysb33r While adding SnakeYAML to the classpath worked for you and I as described previously, I don't think this is something developers should have to do. JRuby should use the jar that is contained in the jruby-complete-x.jar. I think the correct resolution is to file a ticket against JRuby. What do you think?
@mouyang The real issue was Gradle polluting the classpath with its own internal version of snakeyaml
I had some "strange" strange failures with 1.6.0-alpha.11 and JRuby 9.0.5.0.
Typical failure was
The problem is resolved when SnakeYaml v1.13 is placed on the classpath.
I am not really sure how this should be resolved at a build level atm, but it is worthwhile raising as an issue so that it can be considred for testing purposes.