Closed demagnevalCegelec closed 3 years ago
NoMethodError: asciidoctor: FAILED: documentation/Figures.adoc: Failed to load AsciiDoc document - undefined method `request_post' for Net::HTTP:Class
/usr/local/bundle/gems/asciidoctor-kroki-0.5.0/lib/asciidoctor/extensions/asciidoctor_kroki/extension.rb:380:in `post'
/usr/local/bundle/gems/asciidoctor-kroki-0.5.0/lib/asciidoctor/extensions/asciidoctor_kroki/extension.rb:356:in `get_image'
/usr/local/bundle/gems/asciidoctor-kroki-0.5.0/lib/asciidoctor/extensions/asciidoctor_kroki/extension.rb:291:in `save'
/usr/local/bundle/gems/asciidoctor-kroki-0.5.0/lib/asciidoctor/extensions/asciidoctor_kroki/extension.rb:221:in `create_image_src'
/usr/local/bundle/gems/asciidoctor-kroki-0.5.0/lib/asciidoctor/extensions/asciidoctor_kroki/extension.rb:160:in `process'
/usr/local/bundle/gems/asciidoctor-kroki-0.5.0/lib/asciidoctor/extensions/asciidoctor_kroki/extension.rb:30:in `process'
/usr/local/bundle/gems/asciidoctor-2.0.15/lib/asciidoctor/parser.rb:1047:in `[]'
/usr/local/bundle/gems/asciidoctor-2.0.15/lib/asciidoctor/parser.rb:1047:in `build_block'
/usr/local/bundle/gems/asciidoctor-2.0.15/lib/asciidoctor/parser.rb:895:in `next_block'
/usr/local/bundle/gems/asciidoctor-2.0.15/lib/asciidoctor/parser.rb:385:in `next_section'
/usr/local/bundle/gems/asciidoctor-2.0.15/lib/asciidoctor/parser.rb:370:in `next_section'
/usr/local/bundle/gems/asciidoctor-2.0.15/lib/asciidoctor/parser.rb:370:in `next_section'
/usr/local/bundle/gems/asciidoctor-2.0.15/lib/asciidoctor/parser.rb:97:in `parse'
/usr/local/bundle/gems/asciidoctor-2.0.15/lib/asciidoctor/document.rb:538:in `parse'
/usr/local/bundle/gems/asciidoctor-2.0.15/lib/asciidoctor/load.rb:83:in `load'
/usr/local/bundle/gems/asciidoctor-2.0.15/lib/asciidoctor/convert.rb:77:in `convert'
/usr/local/bundle/gems/asciidoctor-2.0.15/lib/asciidoctor/convert.rb:189:in `block in convert_file'
/usr/local/bundle/gems/asciidoctor-2.0.15/lib/asciidoctor/convert.rb:189:in `open'
/usr/local/bundle/gems/asciidoctor-2.0.15/lib/asciidoctor/convert.rb:189:in `convert_file'
/usr/local/bundle/gems/asciidoctor-2.0.15/lib/asciidoctor/cli/invoker.rb:130:in `block in invoke!'
/usr/local/bundle/gems/asciidoctor-2.0.15/lib/asciidoctor/cli/invoker.rb:113:in `each'
/usr/local/bundle/gems/asciidoctor-2.0.15/lib/asciidoctor/cli/invoker.rb:113:in `invoke!'
/usr/local/bundle/gems/asciidoctor-2.0.15/bin/asciidoctor:15:in `<top (required)>'
/usr/local/bundle/bin/asciidoctor:17:in `load'
/usr/local/bundle/bin/asciidoctor:17:in `<top (required)>'
I think I misread the Ruby stdlib documentation. It seems that ::Net::HTTP.request_post
does not exist:
I believe that the code should be:
res = ::Net::HTTP.post(URI(uri), data, "Content-Type" => "text/plain")
res.body
I have tested youre tips and it works fine
Launching the command :
return