asciidoctorj is throwing " HTML5/Slim backend needs Slim >= 2.1.0! "

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

asciidoctorj is throwing " HTML5/Slim backend needs Slim >= 2.1.0! "

rajmahendra
I installed asciidoctorj through sdkman on babun/cygwin.

When i run asciidocorj as

asciidoctorj -T backends/slim slides.adoc  

I got following exception

slides.adoc: Failed to parse source, asciidoctor: FAILED: HTML5/Slim backend needs Slim >= 2.1.0!

Anything I am missing ?
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctorj is throwing " HTML5/Slim backend needs Slim >= 2.1.0! "

abelsromero
Welcome Rajmahendra,

The Asciidoctorj version provided by Sdkman is v 1.5.2 which comes with Slim 2.0.3 embedded, newer versions include newer Slim versions (last is 1.5.4).

The quickest solution is to install the gem (a.k.a. Ruby library) in you machine, but first you need to install Ruby.
If you are in a *nix machine, I'm sure you have any trouble with RVM (https://rvm.io/), in Windows, well...there're some nice installers (http://rubyinstaller.org/downloads/) but they mess with the env bit.
Once you have done that, you can just install the asciidoctor gem and use it directly in the shell. I am a Java guy too and I can say that using the Ruby gem is really easy.

You can find a nice guide here of how to install the gems: https://github.com/asciidoctor/asciidoctor-reveal.js

Let us know if you have any other issue.
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctorj is throwing " HTML5/Slim backend needs Slim >= 2.1.0! "

mojavelinux
Administrator

Wouldn't it be simplest just to download the AsciidoctorJ distribution, extract it and copy it to the gvm directory, and update the current symlink? That's what I did I'm running the asciidoctorj command with 1.5.4.

I agree it's useful to be familiar with using the Ruby version directly, but it's not a hard requirement.

-Dan

Reply | Threaded
Open this post in threaded view
|

Re: asciidoctorj is throwing " HTML5/Slim backend needs Slim >= 2.1.0! "

abelsromero
Yes, of course you can just update the sdkman installation.

I'm quite extremist with these tools and I don't like to manually change stuff. But it should be easy to add another AsciidoctorJ as another 'candidate' folder and just update the 'current' reference.