ERROR: Error installing nokogiri:
The last version of nokogiri (>= 0) to support your Ruby & RubyGems was 1.10.7. Try installing it with `gem install nokogiri -v 1.10.7`
nokogiri requires Ruby version >= 2.3, < 2.7.dev. The current ruby version is 2.7.0.dev.
NOTE FROM THE MAINTAINERS: Nokogiri v1.10.10, released in July 2020, supports Ruby 2.7 on Windows.
@francesco-loreti thanks for opening this issue. You don't mention it, but I'm going to assume that you're trying to install the "fat binary" gem that contains precompiled DLLs (and not compiling the vanilla gem using DevKit).
I'm planning to ship a version of Nokogiri later this week that contains precompiled DLLs for Ruby 2.7 (rake-compiler v1.0.9 was released last week for this support). Hold tight until then! And thanks for your patience as we try to ensure the best user experience we can for you.
Thanks you for your job!!!
The instructions for installation on Windows using DevKit, linked into your Wiki page, not working. There is other way?
Regards and Good Year!!!
Hi - we don't provide instructions for compiling with DevKit, because it's a rather advanced topic. If you've never used DevKit before, I'd advise waiting until support arrives in nokogiri v1.11.0.
If you've used DevKit before and you're seeing something odd, please open a new github issue and make sure to answer the questions in the issue template. Thank you!
Happy new year for everyone who counts according to the Gregorian calendar!
@francesco-loreti There are two ways to install nokogiri as non binary gem on Windows:
gem install nokogiri --platform=ruby
installs nokogiri with builtin libxml sources and
ridk exec pacman -S mingw-w64-x86_64-libxslt
gem install nokogiri --platform=ruby -- --use-system-libraries
installs nokogiri with MSYS2 libraries. We need to update the install instructions for Windows. They are outdated.
@flavorjones I already updated the pull request for fat binary gems to ruby-2.7 here: https://github.com/sparklemotion/nokogiri/pull/1571 But I didn't release rake-compiler-dock-1.0.0 yet. This will follow in the next days. So keep calm and sparkle on!
@flavorjones https://github.com/sparklemotion/nokogiri/pull/1571 is finished from my point of view. My proposal is, that we merge it, but don't push linux fat binary gems for now. That would safe me the time to update both (Windows and Windows+Linux) branches. What do you think?
I also hit this issue when trying to run bundle install for skoji/gepub on Ruby 2.7 + Windows. I'm not sure how "fat binary" applies in this case since gepub just declares a runtime dependency on nokogiri.
Hi, is this issue fixed? I don't want to downgrade to ruby 2.6 just because of this issue...
is this issue fixed?

I don't want to downgrade to ruby 2.6 just because of this issue...
If you don't want to do something, just don't do it.
@larskanis I agree, I'll merge #1571. Thanks for your patience.
@HarshdipD @slonopotamus @francesco-loreti this will be fixed when Nokogiri v1.11.0 is shipped. Please watch the milestone for progress, but I'm hopeful this will happen in the next few weeks.
OK, the work done by @larskanis on #1571 has been merged onto master. I will try to cut a release candidate today so windows users will have _something_ to use on Ruby 2.7.
Nokogiri release candidate v1.11.0.rc1 has been released with precompiled native libraries for Windows and Ruby 2.7. Please give it a whirl and let me know if you have any problems.
I'll close this in a few days unless someone has issues.
Nokogiri release candidate v1.11.0.rc1 has been released with precompiled native libraries for Windows and Ruby 2.7. Please give it a whirl and let me know if you have any problems.
Work!! Thanks you for your great job!!!
Hi - I'm still getting the same error after running the command "gem install nokogiri -v 1.11.0.rc1 --prerelease". However, the rc version is installed, but the error is same.
@Shahrukhhashmi Can you please open a new issue with all necessary details?
@larskanis Thanks for writing back. Sure, I can do that but, the issue and details are same as mentioned by @francesco-loreti.
ERROR: Error installing nokogiri:
The last version of nokogiri (>= 0) to support your Ruby & RubyGems was 1.10.7. Try installing it with gem install nokogiri -v 1.10.7 nokogiri requires Ruby version >= 2.3, < 2.7.dev. The current ruby version is 2.7.0.dev.
@Shahrukhhashmi You shouldn't put a space before "prerelease". This should work:
gem inst nokogiri --pre
@larskanis I have also run this command. Nokogiri RC is successfuly installed, but when I try to install rails, it producess the same error.
any update ?
ERROR: Error installing nokogiri:
The last version of nokogiri (= 1.10.8) to support your Ruby & RubyGems was 1.10.8. Try
installing it with `gem install nokogiri -v 1.10.8`
nokogiri requires Ruby version >= 2.3, < 2.7.dev. The current ruby version is 2.7.0.0.
@malohtie You do not need to ask if there's any update. That triggers a email to everyone who subscribed to this issue. You can just read comments and see that there were no messages in last 8 days.
Also, @larskanis explicitly asked to open new issue if there are still some problems.
@slonopotamus i saw the updates, i still got problem when trying to install it even with pre release , also you can unsubscribe if you don't want to see a simple email
cheers
All - this issue is driving whether the prerelease, v1.11.0.rc1, can be installed and run on windows. It can, and is closed. Subsequent comments above indicate that Gemfiles and/or other gems' dependencies are still on 1.10.8. That's not something the Nokogiri project can solve, please report upstream as necessary.
PLEASE NOTE: Nokogiri v1.10.10 supports Ruby 2.7 on Windows.
Most helpful comment
Happy new year for everyone who counts according to the Gregorian calendar!
@francesco-loreti There are two ways to install nokogiri as non binary gem on Windows:
installs nokogiri with builtin libxml sources and
installs nokogiri with MSYS2 libraries. We need to update the install instructions for Windows. They are outdated.
@flavorjones I already updated the pull request for fat binary gems to ruby-2.7 here: https://github.com/sparklemotion/nokogiri/pull/1571 But I didn't release rake-compiler-dock-1.0.0 yet. This will follow in the next days. So keep calm and sparkle on!