-
Notifications
You must be signed in to change notification settings - Fork 28
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
Issue on Windows: Undefined method `to_citeproc' for an instance of String #95
Comments
I would also be interested in information. I have a similar problem on macOS. From the downloaded gem dependencies, it seems a dependency problem. |
Same issue. Which is unfortunate, as I was trying to give AsciiDoc a chance for documenting schoolwork this year to avoid the many Bibliography information errors I ran into with Pandoc...only to run into it yet again here ;-; Guessing dependency error as well. Haven't quite figured out the RVM and Gem management stuff on Windows so probably will need to test when I have another free day to dive into that. |
These seems to be a compatibility error introduced by Ruby 3.3. All the tests work on Ruby 3.2. FYI, you might want to give https://github.com/riboseinc/asciidoctor-bibliography a try. |
The error is actually coming from bibtex-ruby. The version this gem is using is not compatible with Ruby 3.3. However, the latest version is. So it's a matter of upgrading that gem. |
I've fixed the main branch. We'll need @ProgramFan to publish a release in order for it to be included in the version from RubyGems.org. |
Thanks very much @mojavelinux! For anyone who wants a quick way to get started now, I found I can install directly from the main branch (now fixed for me) using: # Remove everything to start from clean
gem uninstall asciidoctor-bibtex bibtex-ruby citeproc-ruby cls-styles
# Install directly from the main branch
gem install specific_install
gem specific_install -l https://github.com/asciidoctor/asciidoctor-bibtex Would probably work on Mac and Linux too. Obviously best to install from the release when it's out, but this was useful for me to just get going quickly. |
Thanks for the tip! There's also another way of using code directly from GitHub (or git for that matter) if you are using Bundler. Your Gemfile would look like this:
Then run:
You can then use
|
Nice, I'll keep those methods in mind. Thanks again! |
The asciidoctor-bibtex extension is great! However, I'm having an issue that is preventing it from working on Windows.
Minimal problem
On Windows, after installing asciidoctor (version 2.0.20), and asciidoctor-bibtex (0.8.0), create the following minimal bibtex file
ref.bib
:and the following document
test.adoc
:= Test cite:[urban2021assessing] bibliography::[]
On running
asciidoctor -r asciidoctor-bibtex test.adoc
, I get the following error:When adding
--trace
, I get:Versions
I obtained all the dependencies by running
gem install asciidoctor-bibtex
in the powershell, which gave the following log:More Testing
I thought initially the problem was with bibtex-ruby, because I was able to reproduce the same kind of issue by following the instructions on their readme page.
For example, running the following commands in
irb
(with bibtex-ruby version 5.1.6, as installed by asciidoctor-bibtex dependencies), I get:The final line produces the following error:
However, if I remove all my packages:
and then reinstall just bibtex-ruby and citeproc-ruby (getting the latest versions):
the problem seems to go away (when I run the same commands as above in
irb
):Oddly, the command returns nil, when it should return a non-null entry (based on the bibtex-ruby readme). I haven't figured out the discrepancy, but my main thought was just that the
to_citeproc
error had gone. That made me think maybe there is some kind of version issue?It works in Linux
Testing out using Linux Mint 21.1 Cinnamon, running:
All the gem versions look the same as Windows to me (unless I missed something), but it does work on Linux (the minimal example above right at the top runs fine).
That made me think maybe it was a Ruby version issue -- on Linux,
ruby --version
givesruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu]
, and on Windows it givesruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x64-mingw-ucrt]
. Not sure if that would make any difference.Conclusion
Not knowing anything about Ruby, I'm not really sure what the issue is, but it looked like some kind of dependency thing. I wondered if you would be able to offer any insight or any workarounds? (Or point out if I did anything obviously wrong, which would be ideal!)
Thanks in advance.
The text was updated successfully, but these errors were encountered: