Bill Turner
Bill Turner

Reputation: 879

asciidoctor breaks rendering deck.js backend

I am attempting to use the deck.js backend with asciidoctor. I followed the instructions at http://asciidoctor.org/docs/install-and-use-deckjs-backend/. I get the following error:

$ asciidoctor --trace -T asciidoctor-backends/haml deckjs-example.asciidoc 
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- asciidoctor/stylesheets (LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/worldwidewilly/Dropbox/presentations/adoc-deck/asciidoctor-backends/haml/deckjs/helpers.rb:1:in `<top (required)>'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /var/lib/gems/1.9.1/gems/asciidoctor-0.1.4/lib/asciidoctor/renderer.rb:121:in `block in initialize'
    from /var/lib/gems/1.9.1/gems/asciidoctor-0.1.4/lib/asciidoctor/renderer.rb:69:in `each'
    from /var/lib/gems/1.9.1/gems/asciidoctor-0.1.4/lib/asciidoctor/renderer.rb:69:in `initialize'
    from /var/lib/gems/1.9.1/gems/asciidoctor-0.1.4/lib/asciidoctor/document.rb:743:in `new'
    from /var/lib/gems/1.9.1/gems/asciidoctor-0.1.4/lib/asciidoctor/document.rb:743:in `renderer'
    from /var/lib/gems/1.9.1/gems/asciidoctor-0.1.4/lib/asciidoctor/document.rb:752:in `render'
    from /var/lib/gems/1.9.1/gems/asciidoctor-0.1.4/lib/asciidoctor.rb:915:in `render'
    from /var/lib/gems/1.9.1/gems/asciidoctor-0.1.4/lib/asciidoctor/cli/invoker.rb:86:in `block in invoke!'
    from /var/lib/gems/1.9.1/gems/asciidoctor-0.1.4/lib/asciidoctor/cli/invoker.rb:79:in `each'
    from /var/lib/gems/1.9.1/gems/asciidoctor-0.1.4/lib/asciidoctor/cli/invoker.rb:79:in `invoke!'
    from /var/lib/gems/1.9.1/gems/asciidoctor-0.1.4/bin/asciidoctor:13:in `<top (required)>'
    from /usr/local/bin/asciidoctor:23:in `load'
    from /usr/local/bin/asciidoctor:23:in `<main>'

My document - deckjs-example - looks like:

= Asciidoctor Deckjs Example
Bill Turner
:backend: deckjs
:deckjs_theme: web-2.0
:deckjs_transition: horizontal-slide
:navigation:
:blank:
:goto:
:menu:
:status:
:split:
:toc:

== Title of Slide One
Hello World!

[canvas-image="images/groovy.jpg"]
== Slide Two's Title will not be displayed

[role="canvas-caption", position="center-up"]
This text is displayed on top of the example.jpg image.

My directory contains all the things that I seem to need to have installed:

$ ls
total 32K
22021551 drwxr-xr-x 7 worldwidewilly worldwidewilly 4.0K Apr 27 13:38 asciidoctor-backends
24910534 drwxr-xr-x 8 worldwidewilly worldwidewilly 4.0K Apr 21 20:30 deck.js
  527971 -rw-r--r-- 1 worldwidewilly worldwidewilly  394 Apr 27 14:01 deckjs-example.asciidoc
26740079 drwxr-xr-x 2 worldwidewilly worldwidewilly 4.0K Apr 27 14:00 images

I presume a configuration problem. Searching has yet to reveal a solution, though I did find a similar problem on the AsciiDoctor discussion group which, unfortunately, did not seem to provide a solution, at least not one I understood.

Upvotes: 0

Views: 186

Answers (1)

Bill Turner
Bill Turner

Reputation: 879

I am running on Linux Mint 17. It turns out that the asciidoctor package available in the package manager was hopelessly out of date. Note the version used above: asciidoctor-0.1.4. When I updated to the latest version, 1.5.2, all worked fine.

Upvotes: 0

Related Questions