asciidoctor / jekyll-asciidoc

:syringe: A Jekyll plugin that converts AsciiDoc source files in your site to HTML pages using Asciidoctor.
https://github.com/asciidoctor/jekyll-asciidoc
MIT License
311 stars 78 forks source link

asciidoctor-diagram fails to find dot.exe #273

Closed BerkhanEminsoy closed 2 years ago

BerkhanEminsoy commented 2 years ago

Although I'm not sure if this is right place to post this but as I've summarized in the title, after following the instructions to enable the asciidoctor-diagram in .adoc files, the extension fails to find dot.exe, throwing the errors below;

asciidoctor: ERROR: 2017-05-20-diagram-in-a-post.adoc: line 8: Failed to generate image: Could not find the 'dot' executable in PATH; add it to the PATH or specify its location using the 'graphvizdot' document attribute
asciidoctor: ERROR: 2017-05-20-diagram-in-a-post.adoc: line 18: Failed to generate image: no implicit conversion of nil into String
asciidoctor: ERROR: ascii-sampleDiagram.adoc: line 7: Failed to generate image: Could not find Java executable

You can find my build in my repo either in the main branch (also my working branch) or the source branch (where my github page gets built/deployed), but in my gem file I have;

source 'https://rubygems.org'
gem 'jekyll', '~> 4.2'
gem 'jekyll-include-cache', group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
  gem 'kramdown-parser-gfm' if ENV['JEKYLL_VERSION'] == '~> 3.9'
  gem 'asciidoctor-diagram', '~> 2.2', '>= 2.2.1'
  gem 'jekyll-asciidoc', github: 'asciidoctor/jekyll-asciidoc'
  gem 'minitest', '~> 5.14', '>= 5.14.4'
  gem 'rake', '~> 13.0', '>= 13.0.6'
  gem 'minima', '~> 2.5'
  gem 'jemoji', '~> 0.12.0'
  gem 'titleize', '~> 1.4', '>= 1.4.1'
  gem 'jekyll-remote-theme', '~> 0.4.3'
  gem 'jekyll-timeago', '~> 0.13.1'
  gem 'jekyll-feed', '~> 0.12'
  gem 'jekyll-sitemap', '~>1.4'
  gem 'jekyll-archives', '~> 2.2', '>= 2.2.1'
  gem 'jekyll-scholar', '~> 7.0'
  gem 'jekyll-webp', '~> 1.0'
  gem 'jekyll-loading-lazy', '~> 0.1.1'
  gem 'jekyll_figure', '~> 0.0.3'
end

platforms :mingw, :x64_mingw, :mswin, :jruby do
  gem 'tzinfo', '~> 1.2'
  gem 'tzinfo-data'
end

gem 'wdm', '~> 0.1.1', :platforms => [:mingw, :x64_mingw, :mswin]
gem 'eventmachine', '1.2.7', git: 'https://github.com/eventmachine/eventmachine.git', tag: 'v1.2.7'

and my config is as follows;

############################################################
# Plugins (previously gems)
plugins:
 - asciidoctor-diagram
 - jekyll-asciidoc
 - jekyll-feed
 - jekyll-seo-tag
 - jekyll-remote-theme
 - jekyll-include-cache
 - jekyll-archives
 - jekyll/scholar
 - jekyll-webp
 - jekyll-loading-lazy
 - jekyll_figure
 - jemoji
 - titleize

############################################################
# Site configuration for the Jekyll-AsciiDoc Plugin
keep_files:
  - images

asciidoc: {}
asciidoctor:
  base_dir: :docdir
  safe: unsafe
  attributes:
    imagesdir: assets/img/ascii
    stem: ''
    :page-layout: auto@

I'll also add the steps I've taken to address the problem in no particular order;

Any help is much appreciated!

mojavelinux commented 2 years ago

Please direct usage questions to the project chat at https://asciidoctor.zulipchat.com.

The issue you are likely facing is that you have to tell Asciidoctor Diagram where the location of dot.exe using an AsciiDoc attribute. See https://docs.asciidoctor.org/diagram-extension/latest/#specifying-diagram-generator-paths We can elaborate in the chat.