A
A
Andrey2017-02-04 20:15:29
Ruby on Rails
Andrey, 2017-02-04 20:15:29

What is the Gem::InstallError?

I started to study a new project, there is a gemset. The version of ruby ​​ruby-2.0.0 is used.
When I do the bundle, it gives the following error -

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

There is no nokogiri in the gemfile, apparently this is a dependency.
When installing manually, the same error. I install previous versions - they are installed, but the bundle still pulls up version 1.7.0.1
What tell me? I understand that changing the version of ruby ​​is not an option.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2017-02-09
@andreychumak

The option is to look for whose dependency it is and install an older version, which in turn will require an older version of nokogiri. But it's all so bad that it's disgusting to even write about it.
So put yourself rvm and update ruby ​​through it. Here is a list of the basic rvm commands you will need:

rvm list
rvm install 2.3.3
rvm use 2.3.3
rvm --default use 2.3.3

This is a list, not an order of execution. And if you did not install your ruby ​​through rvm, then you will probably have to remove it first and install it through rvm.
If you have several projects and you are afraid of conflicts between ruby ​​and gem versions, then use .rubyversionit .rubygemsetin your projects as well.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question