Skip to content

asciidoctorj-pdf does not work with JRuby 1.7.23 #3496

@robertpanzer

Description

@robertpanzer

When rendering a document with asciidoctorj-pdf on Win7 rendering fails in the Addressable gem where a file is opened that is part of the gem and therefore packaged in a jar.

The error can be reproduced easily with this gradle build file running gradle runTest:

repositories {
    jcenter()
}

configurations {
    run
}

dependencies {
    run 'org.asciidoctor:asciidoctorj:1.5.3.2'
    run 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.10'
    run 'org.asciidoctor:asciidoctorj-diagram:1.3.1'
    run 'org.jruby:jruby-complete:1.7.23'
}

task createTestDoc << {
    new File('test.adoc').text = '''= Test document

Test''' 
}

task runTest(type: JavaExec, dependsOn: createTestDoc) {
    classpath = configurations.run
    main = 'org.asciidoctor.cli.AsciidoctorInvoker'
    args '-r', 'asciidoctor-diagram', '-b', 'pdf', 'test.adoc'
}

Setting the jruby version to 1.7.21 makes the build pass.

The error I see is:

org.jruby.exceptions.RaiseException: (Errno::ENOENT) C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj-pdf/1.5.0-alpha.10/3ba8b2d410fba94473c3550f187c345980e16093/asciidoctorj-pdf-1.5.0-alpha.10.jar!C:/gems/addressable-2.3.8/data/unicode.data
        at org.jruby.RubyFile.initialize(org/jruby/RubyFile.java:370)
        at org.jruby.RubyIO.open(org/jruby/RubyIO.java:1179)
        at RUBY.IDNA(C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj-pdf/1.5.0-alpha.10/3ba8b2d410fba94473c3550f187c345980e16093/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/addressable-2.3.8/lib/addressable/idna/pure.rb:331)
        at RUBY.Addressable(C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj-pdf/1.5.0-alpha.10/3ba8b2d410fba94473c3550f187c345980e16093/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/addressable-2.3.8/lib/addressable/idna/pure.rb:20)
        at RUBY.(root)(C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj-pdf/1.5.0-alpha.10/3ba8b2d410fba94473c3550f187c345980e16093/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/addressable-2.3.8/lib/addressable/idna/pure.rb:19)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1040)
        at RUBY.(root)(/C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.23/98150edb47ccc36917c1ef475d694b91a3356245/jruby-complete-1.7.23.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1)
        at RUBY.require(/C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.23/98150edb47ccc36917c1ef475d694b91a3356245/jruby-complete-1.7.23.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1040)
        at RUBY.(root)(C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj-pdf/1.5.0-alpha.10/3ba8b2d410fba94473c3550f187c345980e16093/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/addressable-2.3.8/lib/addressable/idna.rb:24)
        at RUBY.(root)(/C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.23/98150edb47ccc36917c1ef475d694b91a3356245/jruby-complete-1.7.23.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1040)
        at RUBY.require(/C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.23/98150edb47ccc36917c1ef475d694b91a3356245/jruby-complete-1.7.23.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54)
        at RUBY.(root)(C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj-pdf/1.5.0-alpha.10/3ba8b2d410fba94473c3550f187c345980e16093/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/addressable-2.3.8/lib/addressable/uri.rb:20)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1040)
        at RUBY.(root)(/C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.23/98150edb47ccc36917c1ef475d694b91a3356245/jruby-complete-1.7.23.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1)
        at RUBY.require(/C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.23/98150edb47ccc36917c1ef475d694b91a3356245/jruby-complete-1.7.23.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54)
        at RUBY.(root)(C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj-pdf/1.5.0-alpha.10/3ba8b2d410fba94473c3550f187c345980e16093/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/css_parser-1.3.7/lib/css_parser.rb:1)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1040)
        at RUBY.(root)(/C:/obert.panzer/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.23/98150edb47ccc36917c1ef475d694b91a3356245/jruby-complete-1.7.23.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1)
        at RUBY.require(/C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.23/98150edb47ccc36917c1ef475d694b91a3356245/jruby-complete-1.7.23.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1040)
        at RUBY.Document(C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj-pdf/1.5.0-alpha.10/3ba8b2d410fba94473c3550f187c345980e16093/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/prawn-svg-0.21.0/lib/prawn/svg/document.rb:3)
        at RUBY.(root)(C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj-pdf/1.5.0-alpha.10/3ba8b2d410fba94473c3550f187c345980e16093/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/prawn-svg-0.21.0/lib/prawn/svg/document.rb:1)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1040)
        at RUBY.(root)(/C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.23/98150edb47ccc36917c1ef475d694b91a3356245/jruby-complete-1.7.23.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1)
        at RUBY.require(/C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.23/98150edb47ccc36917c1ef475d694b91a3356245/jruby-complete-1.7.23.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54)
        at RUBY.(root)(C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.asciidoctor/asciidoctorj-pdf/1.5.0-alpha.10/3ba8b2d410fba94473c3550f187c345980e16093/asciidoctorj-pdf-1.5.0-alpha.10.jar!/gems/prawn-svg-0.21.0/lib/prawn-svg.rb:12)
        at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1040)
        at RUBY.(root)(/C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.23/98150c36917c1ef475d694b91a3356245/jruby-complete-1.7.23.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1)
        at RUBY.require(/C:/Users/robert.panzer/.gradle/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.23/98150edb47ccc36917c1ef475d694b91a3356245/jruby-complete-1.7.23.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions