Closed demagnevalCegelec closed 3 years ago
If I launch it with the directory path it's work
asciidoctor -r /usr/local/bundle/gems/asciidoctor-kroki-0.1.1/lib/asciidoctor/extensions/asciidoctor_kroki *.adoc -D public
Hello @demagnevalCegelec I can see jruby in the stacktrace. Are you using Asciidoctor Ruby with MRI or Asciidoctor Ruby with JRuby?
Looks like JRuby cannot resolve the gem. Is it working with other gems? For instance with https://github.com/asciidoctor/asciidoctor-diagram?
Hello Mogztter,
Yes I'am using JRuby to generate RevealJs Slides show becaus I was having some issue generating PlantUML diagram with Ruby images
I use Gitlab-CI to create my slides with bundle exec asciidoctor-revealjs
my command was bundle exec asciidoctor-revealjs -r asciidoctor-diagram *.adoc -D public
with Jruby witch work perfectly with asciidoctor-diagram but not with svgbob that's why I decide to switch to asciidoctor_kroki
I see. To be honest, I didn't try to load this Gem using JRuby. I thought it would just work as expected but maybe I need to adjust the Gem a bit to comply with the JRuby gem loader.
Could you please tell me more about your JRuby install? Are you using rvm to install JRuby? May I ask why are using JRuby instead of MRI? JRuby is great but I believe that you will get better performance with Asciidoctor using MRI especially if you are running short-lived processes.
I use the standard jruby docker image. I have the following Gemfile :
source 'https://rubygems.org'
gem 'asciidoctor', '~> 2.0', '>= 2.0.10'
gem 'asciidoctor-revealjs', '~> 4.0', '>= 4.0.1'
gem 'asciidoctor-diagram'
gem 'asciidoctor-kroki'
gem 'graphviz'
I do:
- bundle install
- bundle exec asciidoctor-revealjs -r asciidoctor-diagram -r asciidoctor-kroki *.adoc -D public
> asciidoctor: FAILED: 'asciidoctor-kroki' could not be loaded
> Use --trace for backtrace
The following is working:
bundle exec asciidoctor-revealjs -r asciidoctor-diagram -r /usr/local/bundle/gems/asciidoctor-kroki-0.1.1/lib/asciidoctor/extensions/asciidoctor_kroki *.adoc -D public
I have try to do the same with the ruby docker image, and I had the same issue
I think I need to add a file named asciidoctor-kroki.rb
in lib
otherwise it won't get resolved automatically.
I will do some testing and publish a new version shortly.
@demagnevalCegelec I've released version 0.1.2. Could you please confirm that this issue is resolved?
Yes,
bundle exec asciidoctor-revealjs -r asciidoctor-diagram -r asciidoctor-kroki *.adoc -D public
is working fine with version 0.1.2
Thank's
Awesome, thanks for your feedback :+1:
I have a project where I want to render asciidoc inline svgbob using Kroki. I added
gem 'asciidoctor-kroki'
to myGemfile
. I have donebundle install
successfully but when I run my project with the following command :I have this result :