-
Notifications
You must be signed in to change notification settings - Fork 500
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 method 'role=' for #<Asciidoctor::Block:0x0000563c79016010> #2363
Comments
Can you please provide a sample document? The error message isn't saying that you have a role. The error message is saying that when it goes looking for a role, the object it's looking at is undefined. |
Hm, I don't really understand, but here is a test document:
When you remove the section heading |
It looks like it's some sort of parsing error when the document has a preamble, perhaps one with multiple paragraphs. I'll have a look. |
…o ensure compatbility with Asciidoctor 2.0.10
…o ensure compatbility with Asciidoctor 2.0.10
The issue is here:
That's a very old version of Asciidoctor which is missing the method in question. However, I have determined that it's reasonable for me to make the adjustments to support that version of Asciidoctor as the minimum allowable version. I have a submitted a PR to do that. We'll also run CI against the minimum required version of Asciidoctor and document it in the README. In the meantime, you can fix the issue you're having by upgrading Asciidoctor to at least 2.0.11 (ideally 2.0.18). |
Well, I installed it according to the recommendations and supported systems (https://docs.asciidoctor.org/asciidoctor/latest/install/) on a Ubuntu 20.04 computer, hence I would expect that these error is not supposed to appear. Is there an apt repo which I can use to have a more up-to-date version of asciidoctor and still use the package manager? |
Unfortunately, we have no control over the versions of gems that Linux distributions package. We advise them to always ship the latest patch release, but they don't always follow that recommendation (sometimes due to availability and sometimes due to choice). And those packages sometimes use versions which are not specified in our gemspec (package metadata). The best we can do is try to maintain compatibility for what active Linux distributions will package. And I will tell you I work my tail off to do exactly that. If you want the latest gem versions, we strongly suggest using gem packaging / bundler as advised on this page: https://docs.asciidoctor.org/asciidoctor/latest/install/ruby-packaging/ |
...and I already said I would address that situation. |
Yes, and I appreciate this. I will check the provided link and try to update. Thanks for taking care of this so fast! |
Interesting to note that the current Ubuntu LTS packages asciidoctor 2.0.16 (https://packages.ubuntu.com/jammy/asciidoctor). Still not 2.0.18, but certainly more recent than what is packaged for 20.04. |
…nsure compatbility with Asciidoctor 2.0.10
I followed the instructions and installed asciidoctor-pdf. The output of
asciidoctor-pdf -v
is:However, when I try to convert a very basic document, I get the errormentioned in the title. Added
--trace
gives me:I do not use
role
anywhere in my document.The text was updated successfully, but these errors were encountered: