我正在尝试使用asciidoctor的deck.js后端。我按照http://asciidoctor.org/docs/install-and-use-deckjs-backend/的说明进行操作。我收到以下错误:
$ 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>'
我的文档 - deckjs-example - 看起来像:
= 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.
我的目录包含我似乎需要安装的所有内容:
$ 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
我假设配置问题。搜索尚未揭示解决方案,但我确实在AsciiDoctor讨论组中发现了类似的问题,遗憾的是,它似乎没有提供解决方案,至少没有我理解的解决方案。
答案 0 :(得分:0)
我在Linux Mint 17上运行。事实证明,软件包管理器中提供的asciidoctor软件包已经过时了。请注意上面使用的版本: asciidoctor-0.1.4 。当我更新到最新版本 1.5.2 时,一切正常。