I recently updated some components in my Ruby install in order to use asciidoctor-pdf 1.5.0.alpha.14 , and started seeing a mysterious error. Even on a trivial document foo.txt containing only
= Title
the following command demonstrates the problem:
asciidoctor -b pdf --trace -r asciidoctor-pdf -r asciidoctor-mathematical foo.txt
The traceback says:
/home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/ruby-enum-0.7.1/lib/ruby-enum/enum.rb:34:in `const_set': asciidoctor: FAILED: /tmp/foo.txt: Failed to load AsciiDoc document - wrong constant name default (NameError)
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/ruby-enum-0.7.1/lib/ruby-enum/enum.rb:34:in `define'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/mathematical-1.6.7/lib/mathematical/configuration.rb:7:in `<class:Delimiters>'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/mathematical-1.6.7/lib/mathematical/configuration.rb:4:in `<class:Configuration>'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/mathematical-1.6.7/lib/mathematical/configuration.rb:3:in `<top (required)>'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/mathematical-1.6.7/lib/mathematical.rb:3:in `<top (required)>'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/asciidoctor-mathematical-0.2.2/lib/asciidoctor-mathematical/extension.rb:23:in `process'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor/document.rb:479:in `[]'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor/document.rb:479:in `block in parse'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor/document.rb:478:in `each'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor/document.rb:478:in `parse'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor.rb:1347:in `load'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor.rb:1465:in `convert'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor/cli/invoker.rb:95:in `block in invoke!'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor/cli/invoker.rb:87:in `each'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor/cli/invoker.rb:87:in `invoke!'
from /home/jon/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/asciidoctor-1.5.5/bin/asciidoctor:14:in `<top (required)>'
from /home/jon/.rbenv/versions/2.3.3/bin/asciidoctor:22:in `load'
from /home/jon/.rbenv/versions/2.3.3/bin/asciidoctor:22:in `<main>'
The "wrong constant name" error doesn't turn up at all in a web search, aside from somebody's explanation-free CI output, so I have not the slightest idea what to make of this. Removing -r asciidoctor-mathematical from the build makes the error go away, although I'm not at all sure that it's at fault - I've tried downgrading various components including asciidoctor-mathematical and the error remains. This makes me wonder if I somehow messed up my Ruby install in some other fashion, but as I'm unable to interpret the error I thought I'd start here.
I recently updated some components in my Ruby install in order to use asciidoctor-pdf 1.5.0.alpha.14 , and started seeing a mysterious error. Even on a trivial document foo.txt containing only
the following command demonstrates the problem:
The traceback says:
The "wrong constant name" error doesn't turn up at all in a web search, aside from somebody's explanation-free CI output, so I have not the slightest idea what to make of this. Removing -r asciidoctor-mathematical from the build makes the error go away, although I'm not at all sure that it's at fault - I've tried downgrading various components including asciidoctor-mathematical and the error remains. This makes me wonder if I somehow messed up my Ruby install in some other fashion, but as I'm unable to interpret the error I thought I'd start here.