Open ysb33r opened 1 year ago
Right now this is the intended behavior, and it's even tested: https://github.com/asciidoctor/asciidoctorj/blob/b425925aef5830afa9970b3082269f4d149bb6ba/asciidoctorj-core/build.gradle#L123-L137 The change was introduced in AsciidoctorJ 1.6.0 with this PR: https://github.com/asciidoctor/asciidoctorj/pull/518
So right now I would say that this is the intended behavior, and iirc we did this because an old system installation of Asciidoctor could otherwise break asciidoctorj.
If my Google powers do not trick me, and requiring a gem on the GEM_PATH just adds it to the LOAD_PATH, it should be the same as passing it to asciidoctorj:
asciidoctorj -r asciidoctor-bibtex -a bibtex-file=$(pwd)/biblio.bib -I /Users/rpanzer/.rvm/gems/ruby-2.7.2/gems/asciidoctor-bibtex-0.8.0/ index.adoc
I am happy to change AsciidoctorJ in whatever direction we like, but right now I'd say that this is the intended behavior.
I don't think asciidoctorj handles external GEMs correctly anymore. My starting point for this is https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/658. After I could not figure out what the issue was in the Gradle plugin, I went straight to the asciidoctorj command-line to reproduce the issue
(The location for
GEM_HOME
might differ depending on the specific system).The results in the error
A simple
index.adoc
to use for testing isand the corresponding
biblio.bib
I tested it with Asciidoctor Ruby command-line and it works, so this is definitely an AsciidoctorJ issue.