Skip to content

Problem with internal themes when packed in OSGi bundle #83

@PartTimeDataScientist

Description

@PartTimeDataScientist

I am not sure if that's the right place to file this issue as a possible solution likely requires modifying upstream asciidoctor-pdf but I decided to file it here because the problem is presumably limited to specific usecases of asciidoctorj-pdf and maybe can serve as guidance for someone stumbling across the same problem.

I am using AsciidoctorJ to develop an Eclipse plugin and I realized that version 2.3.3 throws an (ENOTDIR) Not a directory - uri:classloader:/gems/asciidoctor-pdf-2.3.3/data/themes error (where 1.6.2 was working fine) that might be related to this JRuby issue (although this is supposed to be fixed and I am using JRuby-Complete 9.3.8.0).

My workaround is to extract the themes from the jar, bundle them outside of asciidoctorj-pdf in my jar and comment out line 16 in theme_loader.rb. Like I did with prawn.icon I am fine with monkey patching but maybe there is a different way of getting the theme file list that also works in these circumstances.

#BundledThemeNames = (::Dir.children ThemesDir).map {|it| it.slice 0, it.length - 10 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions