Nokogiri Requires Ruby Version < 2.3

Nokogiri requires Ruby version 2.3

Install the newest version of Nokogiri. In Gemfile:

gem 'nokogiri', '~> 1.6.8.rc2'

Fastlane nokogiri requires Ruby version = 2.3.0. Error

After digging around and trying several solutions, I finally solved this. What happened was that I initially installed Fastlane with this command:

brew cask install Fastlane

And it seems that it was using another version of ruby while I had a newer one. So I uninstalled it with:

brew cask uninstall Fastlane

And then I re-installed it with this command:

sudo gem install -n /usr/local/bin fastlane -NV

Because I was having problems with permissions and then all worked good.

References and other solutions:

Github thread

usr/local/bin

Error Installing rails: nokogiri requires Ruby version 2.4, = 2.1.0

Apparently there is an issue1 in Nokogiri compatibility with Ruby 2.4+, you can check the report here; it will be fixed in Nokogiri 1.8.0.

In the meantime, you could use Ruby 2.3.4, until version 1.8.0 is released.

I don't know if that even applies to the version of rails I have
installed.

No, it don't since you will be downgrading Nokogiri version and will not solve the compatibility issue. That worked for users whose Ruby version was prior to 2.1.0

1 Please notice (as pointed out in the comments) that this a Windows-only issue.

Edit:

You can update now your gemfile:

gem "nokogiri", (RUBY_VERSION >= "2.1" ? "~> 1.8" : "~> 1.6.8")

Gem::InstallError: nokogiri requires Ruby version 2.4, = 2.1.0. rails

You need to downgrade the version of nokogiri to ~> 1.6.8

change nokogiri version in Gemfile

gem 'nokogiri', '~> 1.6.8'

Dependency for nokogiri version 1.6.8 is ruby >= 1.9.2 https://rubygems.org/gems/nokogiri/versions/1.6.8

But it is changed for nokogiri version 1.7.1 to ruby >= 2.1.0 https://rubygems.org/gems/nokogiri/versions/1.7.1

InstallError: nokogiri requires Ruby version = 2.1.0

You need to install the compatible version of nokogiri with ruby version 1.9.3

gem 'nokogiri', '~> 1.6', '>= 1.6.8.1' in your Gemfile.

But note, that Ruby versions below 2.1 are no longer maintained and no longer supported by nokogiri.

hope it will help you out



Related Topics



Leave a reply



Submit