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

undefined local variable or method `dest_y' for #<Asciidoctor::Pdf::Converter:0x007fad4c8e0a20> (NameError) #419

Closed
jexp opened this issue Apr 18, 2016 · 2 comments
Assignees
Labels

Comments

@jexp
Copy link

jexp commented Apr 18, 2016

@mojavelinux you should have access to the asciidoc source

asciidoctor-pdf -a pdf-page-size=A4 production/training-neo4j-in-production.adoc --trace

results in:

/Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:318:in `block in convert_section': undefined local variable or method `dest_y' for #<Asciidoctor::Pdf::Converter:0x007fad4c8e0a20> (NameError)
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:2177:in `block in theme_font'
    from /Users/mh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/gems/2.0.0/gems/prawn-2.0.2/lib/prawn/font.rb:62:in `block in font'
    from /Users/mh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/gems/2.0.0/gems/prawn-2.0.2/lib/prawn/font.rb:207:in `save_font'
    from /Users/mh/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/gems/2.0.0/gems/prawn-2.0.2/lib/prawn/font.rb:60:in `font'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/prawn_ext/extensions.rb:185:in `font'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:2176:in `theme_font'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:303:in `convert_section'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:96:in `convert'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-1.5.4/lib/asciidoctor/abstract_block.rb:71:in `convert'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-1.5.4/lib/asciidoctor/abstract_block.rb:80:in `block in content'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-1.5.4/lib/asciidoctor/abstract_block.rb:80:in `map'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-1.5.4/lib/asciidoctor/abstract_block.rb:80:in `content'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-1.5.4/lib/asciidoctor/document.rb:1104:in `content'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:112:in `convert_content_for_block'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:163:in `convert_document'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-pdf-1.5.0.alpha.11/lib/asciidoctor-pdf/converter.rb:96:in `convert'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-1.5.4/lib/asciidoctor/document.rb:1044:in `convert'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-1.5.4/lib/asciidoctor.rb:1503:in `convert'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-1.5.4/lib/asciidoctor/cli/invoker.rb:94:in `block in invoke!'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-1.5.4/lib/asciidoctor/cli/invoker.rb:86:in `each'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-1.5.4/lib/asciidoctor/cli/invoker.rb:86:in `invoke!'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/gems/asciidoctor-pdf-1.5.0.alpha.11/bin/asciidoctor-pdf:31:in `<top (required)>'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/bin/asciidoctor-pdf:23:in `load'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/bin/asciidoctor-pdf:23:in `<main>'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/bin/ruby_executable_hooks:15:in `eval'
    from /Users/mh/.rvm/gems/ruby-2.0.0-p643/bin/ruby_executable_hooks:15:in `<main>'
@mojavelinux
Copy link
Member

This is definitely a bug. You are hitting a branch in a conditional that bumps into a typo.

The reason you are hitting that branch is become the section is missing an ID. You can workaround this temporarily by enabling section IDs when invoking Asciidoctor PDF.

asciidoctor-pdf -a sectids -a pdf-page-size=A4 production/training-neo4j-in-production.adoc

@mojavelinux
Copy link
Member

Fixed!

This fix will be available in the next release.

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

No branches or pull requests

2 participants