I'm getting the following error when installing asciidoctor-epub3 in Windows:
>gem install asciidoctor-epub3 --pre
ERROR: Error installing asciidoctor-epub3:
nokogiri requires Ruby version < 2.4, >= 1.9.2.
These are my current installed versions of ruby and nokogiri:
> ruby --version
ruby 2.4.3p205 (2017-12-14 revision 61247) [x64-mingw32]
> nokogiri --version
# Nokogiri (1.10.1)
I'm afraid I have to downgrade ruby.
But, is there any other solution?
Nokogiri will now accept up to Ruby v. 2.5.x; I ran it on Ruby 2.6.x today, after upgrading to nokogiri 1.8.5, and got this:
nokogiri requires Ruby version >= 2.2, < 2.6. The current ruby version is 184.108.40.206.
Running Ruby under a package manager makes it easier to update/upgrade. So, on Windows, I'm using Chocolatey to install/upgrade.
When I do a minor-version upgrade, like 2.5 -> 2.6, a nice thing with Chocolatey is that it leaves the 2.5 install alone, in its own folder, and puts the new, 2.6 version in a different folder. Then you can change which Ruby version you're using, just by changing the filepath for it in your PATH environment variable (e.g., edit it to have either
C:\tools\ruby26\binA very slight downside is that you have to re-install your self-installed gems, including Asciidoctor, in the new Ruby version; they won't carry over from the old version).
Thanks for the info Andrew!
FYI, the underlying nokogiri issue was fixed in the latest release per https://github.com/asciidoctor/asciidoctor-epub3/issues/177.
On Sat, Jun 15, 2019 at 4:47 PM Andrew Carver [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Nokogiri will now accept up to Ruby v. 2.5.x; I ran it on Ruby 2.6.x today, after upgrading to nokogiri 1.8.5, and got this:nokogiri requires Ruby version >= 2.2, < 2.6. The current ruby version is 220.127.116.11.
May I ask you, then, whether the below sequence run just now on Ruby 2.6.x indicates the nokogiri dependency needs upgrading in asciidoctor-bibliography?
C:\Users\acarver>gem install nokogiri -v 1.8.5 ERROR: Error installing nokogiri: The last version of nokogiri (= 1.8.5) to support your Ruby & RubyGems was 1.8.5. Try installing it with `gem install nokogiri -v 1.8.5` nokogiri requires Ruby version >= 2.2, < 2.6. The current ruby version is 18.104.22.168. C:\Users\acarver>gem install asciidoctor Fetching asciidoctor-2.0.10.gem Successfully installed asciidoctor-2.0.10 Parsing documentation for asciidoctor-2.0.10 Installing ri documentation for asciidoctor-2.0.10 Done installing documentation for asciidoctor after 15 seconds 1 gem installed C:\Users\acarver>gem install asciidoctor-bibliography ERROR: Error installing asciidoctor-bibliography: The last version of nokogiri (~> 1.8.1) to support your Ruby & RubyGems was 1.8.5. Try installing it with `gem install nokogiri -v 1.8.5` and then running the current command again nokogiri requires Ruby version >= 2.2, < 2.6. The current ruby version is 22.214.171.124.
P.S. I'm also baffled by asciidoctor 2.0.10 installing just fine without installing nokogiri...??
(I think the below warning about "the last version of nokogiri ... to support your Ruby & RubyGems was 1.8.5" was probably because I'd already installed asciidoctor 1.5.8, which depends on that version.)
Oh my -- the rabbit-hole goes even deeper:
To run something with asciidoctor-bibliography, of course I had to change my PATH variable back to Ruby 2.5 -- in which I've got these relevant gems installed:
asciidoctor (2.0.10, 126.96.36.199, 1.5.7) asciidoctor-bibliography (0.10.0, 0.8.0, 0.7.2) ... bibtex-ruby (5.0.0, 4.4.6)
But when I ran it, I got this:
Traceback (most recent call last): 14: from C:/tools/ruby25/bin/asciidoctor:23:in `<main>' 13: from C:/tools/ruby25/bin/asciidoctor:23:in `load' 12: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/bin/asciidoctor:13:in `<top (required)>' 11: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/bin/asciidoctor:13:in `new' 10: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/cli/invoker.rb:24:in `initialize' 9: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/cli/options.rb:34:in `parse!' 8: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/cli/options.rb:274:in `parse!' 7: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/cli/options.rb:274:in `each' 6: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/asciidoctor-2.0.10/lib/asciidoctor/cli/options.rb:276:in `block in parse!' 5: from C:/tools/ruby25/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require' 4: from C:/tools/ruby25/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require' 3: from C:/tools/ruby25/lib/ruby/2.5.0/rubygems.rb:217:in `try_activate' 2: from C:/tools/ruby25/lib/ruby/2.5.0/rubygems.rb:224:in `rescue in try_activate' 1: from C:/tools/ruby25/lib/ruby/2.5.0/rubygems/specification.rb:1438:in `activate' C:/tools/ruby25/lib/ruby/2.5.0/rubygems/specification.rb:2325:in `raise_if_conflicts': Unable to activate asciidoctor-bibliography-0.10.0, because asciidoctor-2.0.10 conflicts with asciidoctor (~> 1.5.6) (Gem::ConflictError)
What -- if you know -- does that last line mean??
P.S. On that last one, NEVER MIND: They fixed it -- less than 24 hours ago -- on asciidoctor-bibliography!
|Free forum by Nabble||Edit this page|