I was trying to start a rails project (version 6.x), for which a nokogiri error was there:
ERROR: Error installing rails:
The last version of nokogiri (>= 1.8.5) to support your Ruby & RubyGems was 1.13.10. Try installing it with `gem install nokogiri -v 1.13.10` and then running the current command again
So i downgraded the nokogiri version and now it says:
ERROR: Error installing rails:
There are no versions of nokogiri (~> 1.14) compatible with your Ruby & RubyGems. Maybe try installing an older version of the gem you're looking for?
nokogiri requires Ruby version >= 3.0, < 3.4.dev. The current ruby version is 2.6.4.104.
So i try to upgrade it again to 1.14 using
gem install nokogiri -v '1.14'
And now apparently it can’t find appropriate nokogiri version to install a nokogiri version:
Fetching nokogiri-1.14.0-x86_64-linux.gem
ERROR: Error installing nokogiri:
There are no versions of nokogiri (= 1.14) compatible with your Ruby & RubyGems. Maybe try installing an older version of the gem you're looking for?
nokogiri requires Ruby version >= 2.7, < 3.3.dev. The current ruby version is 2.6.4.104.
I have also tried to install it using apt but that doesn’t work either, I require specifically Ruby 2.6.4 & rails 6.x
4
As per rubygems. Nokogiri 1.14 requires at least Ruby 2.7.
apt install ruby-railties
Thanks for the responses, this worked for me.