asciidoctor / asciidoctor-diagram

:left_right_arrow: Asciidoctor diagram extension, with support for AsciiToSVG, BlockDiag (BlockDiag, SeqDiag, ActDiag, NwDiag), Ditaa, Erd, GraphViz, Mermaid, Msc, PlantUML, Shaape, SvgBob, Syntrax, UMLet, Vega, Vega-Lite and WaveDrom.
http://asciidoctor.org
MIT License
442 stars 107 forks source link

ERROR: unknown format: PDF when running rspec #307

Closed snecklifter closed 3 years ago

snecklifter commented 3 years ago

Hello,

I'm attempting to package asciidoctor-diagram for Fedora but am getting the following error, which I'm sure is trivial to solve but hoping someone can point me in the right direction.

The buildroot has asciidoctor-pdf installed, I'm just wondering if I need to assist rspec to pick that up correctly?

  1) Asciidoctor::Diagram::BlockDiagBlockMacroProcessor blockdiag should generate image blocks when format is set to 'pdf'
     Failure/Error: raise "#{cmd} failed: #{stdout.empty? ? stderr : stdout}"

     RuntimeError:
       asciidoctor: FAILED: <stdin>: Failed to load AsciiDoc document - blockdiag failed: ERROR: unknown format: PDF
     Shared Example Group: "block_macro" called from ./spec/blockdiag_spec.rb:11
     # ./lib/asciidoctor-diagram/util/cli.rb:80:in `run'
     # ./lib/asciidoctor-diagram/util/cli_generator.rb:85:in `generate'
     # ./lib/asciidoctor-diagram/util/cli_generator.rb:20:in `generate_stdin'
     # ./lib/asciidoctor-diagram/blockdiag/converter.rb:24:in `convert'
     # ./lib/asciidoctor-diagram/diagram_processor.rb:170:in `create_image_block'
     # ./lib/asciidoctor-diagram/diagram_processor.rb:86:in `process'
     # /usr/share/gems/gems/asciidoctor-2.0.10/lib/asciidoctor/parser.rb:645:in `[]'
     # /usr/share/gems/gems/asciidoctor-2.0.10/lib/asciidoctor/parser.rb:645:in `next_block'
     # /usr/share/gems/gems/asciidoctor-2.0.10/lib/asciidoctor/parser.rb:379:in `next_section'
     # /usr/share/gems/gems/asciidoctor-2.0.10/lib/asciidoctor/parser.rb:364:in `next_section'
     # /usr/share/gems/gems/asciidoctor-2.0.10/lib/asciidoctor/parser.rb:97:in `parse'
     # /usr/share/gems/gems/asciidoctor-2.0.10/lib/asciidoctor/document.rb:549:in `parse'
     # /usr/share/gems/gems/asciidoctor-2.0.10/lib/asciidoctor/load.rb:83:in `load'
     # ./spec/test_helper.rb:70:in `load_asciidoc'
     # ./spec/shared_examples.rb:41:in `block (3 levels) in <top (required)>'
     # ./spec/test_helper.rb:112:in `block (3 levels) in <top (required)>'
     # ./spec/test_helper.rb:111:in `chdir'
     # ./spec/test_helper.rb:111:in `block (2 levels) in <top (required)>'
     # ./spec/test_helper.rb:112:in `block (3 levels) in <top (required)>'
     # ./spec/test_helper.rb:111:in `chdir'
     # ./spec/test_helper.rb:111:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # RuntimeError:
     #   blockdiag failed: ERROR: unknown format: PDF
     #   ./lib/asciidoctor-diagram/util/cli.rb:80:in `run'
pepijnve commented 3 years ago

That probably means you did not install the PDF support for blockdiag. See http://blockdiag.com/en/blockdiag/introduction.html#setup The specs assume PDF support is available at the moment.

snecklifter commented 3 years ago

@pepijnve thanks, reportlab was missing from the build