asciidoctor-latex - undefined method gsub

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

asciidoctor-latex - undefined method gsub

csadoc
Hello,

I've not had any success running asciidoctor-latex. Haven't been able to find any useful info with Google. (I'm on Win 10 Pro if that matters.)

Running plain old asciidoctor works fine with the test file x.adoc below, and generates nice html5 output (using VS Code preview tools, for example). The target file is in the same directory the following commands were run in (cmd.exe).

Here are the results.

....> asciidoctor-latex x.adoc
undefined method `gsub' for nil:NilClass
  Use --trace for backtrace

....>asciidoctor-latex --trace x.adoc
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:816:in `inline_anchor_process': undefined method `gsub' for nil:NilClass (NoMethodError)
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:740:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/inline.rb:38:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/substitutors.rb:975:in `block in sub_inline_anchors'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/substitutors.rb:962:in `gsub'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/substitutors.rb:962:in `sub_inline_anchors'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/substitutors.rb:948:in `sub_macros'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/substitutors.rb:124:in `block in apply_subs'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/substitutors.rb:113:in `each'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/substitutors.rb:113:in `apply_subs'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/list.rb:76:in `text'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:241:in `block in ulist_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:240:in `each'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:240:in `ulist_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:213:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:70:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/list.rb:30:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `block in content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `map'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:197:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:70:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `block in content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `map'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:197:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:70:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `block in content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `map'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/document.rb:1120:in `content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:160:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/document.rb:1060:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor.rb:1501:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor.rb:1572:in `block in convert_file'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor.rb:1572:in `open'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor.rb:1572:in `convert_file'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/cli/invoker.rb:108:in `block in invoke!'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/cli/invoker.rb:102:in `each'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/cli/invoker.rb:102:in `invoke!'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/bin/asciidoctor-latex:20:in `<top (required)>'
        from C:/Ruby24-x64/bin/asciidoctor-latex:22:in `load'
        from C:/Ruby24-x64/bin/asciidoctor-latex:22:in `<main>'

Any help would be greatly appreciated.
Conrad
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: asciidoctor-latex - undefined method gsub

mojavelinux
Administrator
Please try Asciidoctor 1.5.6.1. This was one of the know issues with 1.5.6.


On Mon, Jul 24, 2017 at 4:47 PM, csadoc [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

I've not had any success running asciidoctor-latex. Haven't been able to find any useful info with Google. (I'm on Win 10 Pro if that matters.)

Running plain old asciidoctor works fine with the test file x.adoc below, and generates nice html5 output (using VS Code preview tools, for example). The target file is in the same directory the following commands were run in (cmd.exe).

Here are the results.

....> asciidoctor-latex x.adoc
undefined method `gsub' for nil:NilClass
  Use --trace for backtrace

....>asciidoctor-latex --trace x.adoc
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:816:in `inline_anchor_process': undefined method `gsub' for nil:NilClass (NoMethodError)
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:740:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/inline.rb:38:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/substitutors.rb:975:in `block in sub_inline_anchors'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/substitutors.rb:962:in `gsub'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/substitutors.rb:962:in `sub_inline_anchors'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/substitutors.rb:948:in `sub_macros'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/substitutors.rb:124:in `block in apply_subs'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/substitutors.rb:113:in `each'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/substitutors.rb:113:in `apply_subs'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/list.rb:76:in `text'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:241:in `block in ulist_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:240:in `each'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:240:in `ulist_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:213:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:70:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/list.rb:30:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `block in content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `map'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:197:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:70:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `block in content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `map'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:197:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:70:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `block in content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `map'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/abstract_block.rb:79:in `content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/document.rb:1120:in `content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:160:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/document.rb:1060:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor.rb:1501:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor.rb:1572:in `block in convert_file'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor.rb:1572:in `open'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor.rb:1572:in `convert_file'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/cli/invoker.rb:108:in `block in invoke!'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/cli/invoker.rb:102:in `each'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6/lib/asciidoctor/cli/invoker.rb:102:in `invoke!'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/bin/asciidoctor-latex:20:in `<top (required)>'
        from C:/Ruby24-x64/bin/asciidoctor-latex:22:in `load'
        from C:/Ruby24-x64/bin/asciidoctor-latex:22:in `<main>'

Any help would be greatly appreciated.
Conrad



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/asciidoctor-latex-undefined-method-gsub-tp5752.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: asciidoctor-latex - undefined method gsub

csadoc
Thanks for the info Dan.

I have no idea which bug is applicable, but no matter. I did the asciidoctor upgrade.

asciidoctor --v
Asciidoctor 1.5.6.1 [http://asciidoctor.org]
Runtime Environment (ruby 2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32]) (lc:IBM437 fs:Windows-1252 in:- ex:UTF-8)

Per instructions here (https://github.com/asciidoctor/asciidoctor-latex#from-rubygems), I tried to update asciidoc-latex:

>gem install asciidoc-latex
ERROR:  Could not find a valid gem 'asciidoc-latex' (>= 0) in any repository
ERROR:  Possible alternatives: ascii_doc_web, asciidoctor, asciidoc-bib, asciidoc-merger, asciidoc

In case that was a typo in the docs, I also tried:

>gem install asciidoctor-latex
ERROR:  Could not find a valid gem 'asciidoctor-latex' (>= 0) in any repository
ERROR:  Possible alternatives: asciidoctor-bibtex, asciidoctor-legal, asciidoctor, asciidoctor-rfc, asciidoctor-doctest

No luck.

In any case, I'm still getting the same sort of error:

>asciidoctor-latex  x.adoc
undefined method `gsub' for nil:NilClass
  Use --trace for backtrace

>asciidoctor-latex --trace x.adoc
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:816:in `inline_anchor_process': undefined method `gsub' for nil:NilClass (NoMethodError)
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:740:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/inline.rb:38:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/substitutors.rb:980:in `block in sub_inline_anchors'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/substitutors.rb:967:in `gsub'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/substitutors.rb:967:in `sub_inline_anchors'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/substitutors.rb:953:in `sub_macros'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/substitutors.rb:126:in `block in apply_subs'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/substitutors.rb:115:in `each'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/substitutors.rb:115:in `apply_subs'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/list.rb:76:in `text'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:241:in `block in ulist_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:240:in `each'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:240:in `ulist_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:213:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:70:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/list.rb:30:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `block in content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `map'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:197:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:70:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `block in content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `map'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:197:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:70:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `block in content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `map'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/document.rb:1120:in `content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:160:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/document.rb:1060:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1502:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575:in `block in convert_file'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575:in `open'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575:in `convert_file'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/cli/invoker.rb:108:in `block in invoke!'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/cli/invoker.rb:102:in `each'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/cli/invoker.rb:102:in `invoke!'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/bin/asciidoctor-latex:20:in `<top (required)>'
        from C:/Ruby24-x64/bin/asciidoctor-latex:22:in `load'
        from C:/Ruby24-x64/bin/asciidoctor-latex:22:in `<main>'

Conrad
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: asciidoctor-latex - undefined method gsub

mojavelinux
Administrator
Conrad,

I see the problem now. Asciidoctor LaTeX is assuming that the reference text is not nil. However, since Asciidoctor 1.5.6(.1), the converter is now responsible for providing a fallback value. So the LaTeX converter needs to check for a nil value. Can you report this in the Asciidoctor LaTeX project?

If Asciidoctor LaTeX had a CI build, we could wire it to be triggered by changes to core to avoid these types of problems in the future.

-Dan

On Tue, Jul 25, 2017 at 11:31 AM, csadoc [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Thanks for the info Dan.

I have no idea which bug is applicable, but no matter. I did the asciidoctor upgrade.

asciidoctor --v
Asciidoctor 1.5.6.1 [http://asciidoctor.org]
Runtime Environment (ruby 2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32]) (lc:IBM437 fs:Windows-1252 in:- ex:UTF-8)

Per instructions here (https://github.com/asciidoctor/asciidoctor-latex#from-rubygems), I tried to update asciidoc-latex:

>gem install asciidoc-latex
ERROR:  Could not find a valid gem 'asciidoc-latex' (>= 0) in any repository
ERROR:  Possible alternatives: ascii_doc_web, asciidoctor, asciidoc-bib, asciidoc-merger, asciidoc

In case that was a typo in the docs, I also tried:

>gem install asciidoctor-latex
ERROR:  Could not find a valid gem 'asciidoctor-latex' (>= 0) in any repository
ERROR:  Possible alternatives: asciidoctor-bibtex, asciidoctor-legal, asciidoctor, asciidoctor-rfc, asciidoctor-doctest

No luck.

In any case, I'm still getting the same sort of error:

>asciidoctor-latex  x.adoc
undefined method `gsub' for nil:NilClass
  Use --trace for backtrace

>asciidoctor-latex --trace x.adoc
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:816:in `inline_anchor_process': undefined method `gsub' for nil:NilClass (NoMethodError)
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:740:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/inline.rb:38:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/substitutors.rb:980:in `block in sub_inline_anchors'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/substitutors.rb:967:in `gsub'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/substitutors.rb:967:in `sub_inline_anchors'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/substitutors.rb:953:in `sub_macros'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/substitutors.rb:126:in `block in apply_subs'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/substitutors.rb:115:in `each'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/substitutors.rb:115:in `apply_subs'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/list.rb:76:in `text'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:241:in `block in ulist_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:240:in `each'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:240:in `ulist_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:213:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:70:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/list.rb:30:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `block in content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `map'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:197:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:70:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `block in content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `map'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:197:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:70:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `block in content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `map'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/abstract_block.rb:79:in `content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/document.rb:1120:in `content'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/node_processors.rb:160:in `tex_process'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/lib/asciidoctor/latex/converter.rb:554:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/document.rb:1060:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1502:in `convert'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575:in `block in convert_file'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575:in `open'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor.rb:1575:in `convert_file'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/cli/invoker.rb:108:in `block in invoke!'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/cli/invoker.rb:102:in `each'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-1.5.6.1/lib/asciidoctor/cli/invoker.rb:102:in `invoke!'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/asciidoctor-latex-1.5.0.17.dev/bin/asciidoctor-latex:20:in `<top (required)>'
        from C:/Ruby24-x64/bin/asciidoctor-latex:22:in `load'
        from C:/Ruby24-x64/bin/asciidoctor-latex:22:in `<main>'

Conrad



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/asciidoctor-latex-undefined-method-gsub-tp5752p5754.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: asciidoctor-latex - undefined method gsub

csadoc
Hello Dan,

Thanks again, and here's the issue I submitted for you:
https://github.com/asciidoctor/asciidoctor-latex/issues/59
Any idea how long a fix is likely to take?

So back to my earlier question, how am I supposed to update asciidoctor-latex (when fix is available)?

I found the documentation and various intros confusing and unclear. Does asciidoctor-latex normally come automatically with asciidoctor gem install?

Or are one of theses approaches supposed to work instead?

Per instructions here (https://github.com/asciidoctor/asciidoctor-latex#from-rubygems), I tried to update asciidoc-latex:

>gem install asciidoc-latex
ERROR:  Could not find a valid gem 'asciidoc-latex' (>= 0) in any repository
ERROR:  Possible alternatives: ascii_doc_web, asciidoctor, asciidoc-bib, asciidoc-merger, asciidoc

In case that was a typo in the docs, I also tried:

>gem install asciidoctor-latex
ERROR:  Could not find a valid gem 'asciidoctor-latex' (>= 0) in any repository
ERROR:  Possible alternatives: asciidoctor-bibtex, asciidoctor-legal, asciidoctor, asciidoctor-rfc, asciidoctor-doctest

PS: I really like asciidoctor, but it's also been very frustrating having to do seemingly endless searching to overcome many gaps in the documentation, not to mention a variety of documented things that just don't work (as in the above "gem installs").

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: asciidoctor-latex - undefined method gsub

mojavelinux
Administrator
> Any idea how long a fix is likely to take? 

I see what needs to happen, so I'll submit a PR. When it is merged and released is up to the maintainer of Asciidoctor LaTeX (currently James Carlson).

> How am I supposed to update asciidoctor-latex (when fix is available)? 

As there isn't yet a final release of Asciidoctor LaTeX (a release number without trailing letters), you have to tell the gem command to install a "pre" release.

gem install asciidoctor-latex --pre

We discovered this quirk with the gem command when we put out the first Asciidoctor PDF alpha release. Even if the gem has no final releases, the gem command still requires the --pre flag to resolve a candidate to install. This is non-intuitive behavior in my opinion, but it's what we're stuck with.

The documentation for Asciidoctor is maintained by the community. We're happy to receive your participation to help make it better. Some parts are better documented than others. It all depends on the commitment of the maintainer and the community around that component. I try to make the documentation for the parts that I maintain as clear as possible, and to lend a hand with other components as time permits. And I know my own documentation has room to grow.

Cheers,

-Dan


On Tue, Jul 25, 2017 at 2:19 PM, csadoc [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello Dan,

Thanks again, and here's the issue I submitted for you:
https://github.com/asciidoctor/asciidoctor-latex/issues/59
Any idea how long a fix is likely to take?

So back to my earlier question, how am I supposed to update asciidoctor-latex (when fix is available)?

I found the documentation and various intros confusing and unclear. Does asciidoctor-latex normally come automatically with asciidoctor gem install?

Or are one of theses approaches supposed to work instead?

Per instructions here (https://github.com/asciidoctor/asciidoctor-latex#from-rubygems), I tried to update asciidoc-latex:

>gem install asciidoc-latex
ERROR:  Could not find a valid gem 'asciidoc-latex' (>= 0) in any repository
ERROR:  Possible alternatives: ascii_doc_web, asciidoctor, asciidoc-bib, asciidoc-merger, asciidoc

In case that was a typo in the docs, I also tried:

>gem install asciidoctor-latex
ERROR:  Could not find a valid gem 'asciidoctor-latex' (>= 0) in any repository
ERROR:  Possible alternatives: asciidoctor-bibtex, asciidoctor-legal, asciidoctor, asciidoctor-rfc, asciidoctor-doctest

PS: I really like asciidoctor, but it's also been very frustrating having to do seemingly endless searching to overcome many gaps in the documentation, not to mention a variety of documented things that just don't work (as in the above "gem installs").




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/asciidoctor-latex-undefined-method-gsub-tp5752p5756.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Loading...