asciidoctor-pdf: undefined method `on_page_create'

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

asciidoctor-pdf: undefined method `on_page_create'

wimalopaan
Hi all,

I was experimenting using a custom style for asciidoctor-pdf and realized, that most of the footer / header-stylings
don't have an effect on the output. Before asking questions I updated my gems, but afterwards I got this error:

/home/lmeier/asciidoctor/asciidoctor-pdf/lib/asciidoctor-pdf/converter.rb:116:in `convert_document': undefined method `on_page_create' for #<Asciidoctor::Pdf::Converter:0x00000001ab6610> (NoMethodError)
        from /home/lmeier/asciidoctor/asciidoctor-pdf/lib/asciidoctor-pdf/converter.rb:86:in `convert'
        from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor/document.rb:1028:in `convert'
        from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1499:in `convert'
        from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:94:in `block in invoke!'
        from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `each'
        from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `invoke!'
        from /home/lmeier/asciidoctor/asciidoctor-pdf/bin/asciidoctor-pdf:27:in `<main>'

Any hints?

--
Wilhelm
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-pdf: undefined method `on_page_create'

mojavelinux
Administrator
What probably happened is that you upgraded Prawn when you updated your gems. Asciidoctor PDF is not yet compatible with the latest Prawn release. You must install Prawn 1.2.1.

The upgrade to Prawn (as well as the issue you reported) is being tracked in the following issue: https://github.com/asciidoctor/asciidoctor-pdf/issues/68

In general, I don't ever recommending updating your gems. That command in RubyGems is terribly broken in my experience. The way you should upgrade is by removing your Gemfile.lock and running bundle again.

 $ rm Gemfile.lock
    bundle

That should always get you the right set of gems.

-Dan

On Tue, Jun 16, 2015 at 5:43 AM, wimalopaan [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi all,

I was experimenting using a custom style for asciidoctor-pdf and realized, that most of the footer / header-stylings
don't have an effect on the output. Before asking questions I updated my gems, but afterwards I got this error:

/home/lmeier/asciidoctor/asciidoctor-pdf/lib/asciidoctor-pdf/converter.rb:116:in `convert_document': undefined method `on_page_create' for #<Asciidoctor::Pdf::Converter:0x00000001ab6610> (NoMethodError)
        from /home/lmeier/asciidoctor/asciidoctor-pdf/lib/asciidoctor-pdf/converter.rb:86:in `convert'
        from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor/document.rb:1028:in `convert'
        from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1499:in `convert'
        from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:94:in `block in invoke!'
        from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `each'
        from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `invoke!'
        from /home/lmeier/asciidoctor/asciidoctor-pdf/bin/asciidoctor-pdf:27:in `<main>'

Any hints?

--
Wilhelm



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



--
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-pdf: undefined method `on_page_create'

wimalopaan
In reply to this post by wimalopaan
Ok, thank you very much!

Now it works again!

Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-pdf: undefined method `on_page_create'

mojavelinux
Administrator

+1