Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indeipherable "wrong constant name default (NameError)" on trivial document #27

Closed
oddhack opened this issue Mar 6, 2017 · 2 comments
Closed

Comments

@oddhack
Copy link

oddhack commented Mar 6, 2017

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.

@tstumm
Copy link
Contributor

tstumm commented Mar 6, 2017

Please see gjtorikian/mathematical#69

@tstumm tstumm closed this as completed Mar 6, 2017
@oddhack
Copy link
Author

oddhack commented Mar 6, 2017

@tstumm thanks. Downgrading to ruby-enum 0.7.0 (seems, build in process) to work for me as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants