I have detected some weird behavior with the tests in 'asciidoctorj-pdf' sub-module. I suspect it may have something to do with my environment.
When running ./gradlew.sh clean test in the parent project from shell (babun) or the equivalent gradlew.nat com CMD, the test 'pdf_source_code_should_be_highlighted' with the error:
org.asciidoctor.internal.AsciidoctorCoreException: org.jruby.exceptions.RaiseException: (RuntimeError) asciidoctor: FAILED: required gem 'rouge' is not installed. Processing aborted.
at org.asciidoctor.internal.JRubyAsciidoctor.renderFile(JRubyAsciidoctor.java:345)
at org.asciidoctor.internal.JRubyAsciidoctor.renderFile(JRubyAsciidoctor.java:434)
at org.asciidoctor.internal.JRubyAsciidoctor.convertFile(JRubyAsciidoctor.java:554)
at org.asciidoctor.WhenBackendIsPdf.pdf_source_code_should_be_highlighted(WhenBackendIsPdf.jav
I checked and the 1.10.1 gem is installed.
When running the test from IntelliJ, I need to run jRubyPrepare first, which is more or less OK. But then both test in WhenBackendIsPdf fail with the message.
org.jruby.exceptions.RaiseException: (LoadError) load error: psych -- java.lang.NoSuchMethodError: org.jruby.gen.org$jruby$ext$psych$PsychParser$POPULATOR.populateMethod(Lorg/jruby/internal/runtime/methods/JavaMethod;ILjava/lang/String;ZLorg/jruby/internal/runtime/methods/CallConfiguration;ZLjava/lang/Class;Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/Class;)V
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:956)
at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:55)
at RUBY.<main>(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/yaml.rb:6)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:956)
Now, the best part, placing the tests in 'itest' sub-module makes both test work in IntelliJ (after manually executin jrubyPrepare) but running from the shell reproduced the same error as the first case (shell execution). Also, I validated the PDF and it gets correctly generated.
I have detected some weird behavior with the tests in 'asciidoctorj-pdf' sub-module. I suspect it may have something to do with my environment.
When running
./gradlew.sh clean test
in the parent project from shell (babun) or the equivalentgradlew.nat
com CMD, the test 'pdf_source_code_should_be_highlighted' with the error:I checked and the 1.10.1 gem is installed.
When running the test from IntelliJ, I need to run jRubyPrepare first, which is more or less OK. But then both test in WhenBackendIsPdf fail with the message.
Now, the best part, placing the tests in 'itest' sub-module makes both test work in IntelliJ (after manually executin jrubyPrepare) but running from the shell reproduced the same error as the first case (shell execution). Also, I validated the PDF and it gets correctly generated.
Any idea?