0
votes

Ruby version: 1.9.3

Gemfile:

   ruby '1.9.3'
   source 'http://rubygems.org'
   gem 'site_prism', '2.6'

Running "bundle install" fails with:

Gem::InstallError: nokogiri requires Ruby version < 2.5, >= 2.2.
An error occurred while installing nokogiri (1.8.1), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.8.1'` succeeds before bundling.

In Gemfile:
 site_prism was resolved to 2.6, which depends on
  capybara was resolved to 2.15.4, which depends on
   xpath was resolved to 2.1.0, which depends on
    nokogiri

nokogiri 1.8.1 is incompatible with Ruby 1.9.3.

Why does bundle try to install a gem that isn't compatible with my current Ruby version?

Things I've tried:

  • Different bundler version (1.12.5, 1.15.4, 1.16.0)
  • Specify "ruby '1.9.3' in Gemfile"
1

1 Answers

0
votes

You are going to need to specify a much older version of nokogiri to get this to work. You may have to specify older versions of capybara or xpath as well. Try putting in your Gemfile

gem 'nokogiri', '1.6.8'

and work from there.