Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gem::InstallError: nokogiri requires Ruby version >= 1.9.2

Trying to do a bundle install to a ruby (sinatra) project and I keep getting this error:

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

So I go ahead and gem install nokogiri -v '1.6.0' and end with success.

Then I try bundle install again and get the error. Rinse and repeat.

I'm not a ruby dev so I'm not sure what to do at this point. Any help?

like image 878
wesbos Avatar asked May 31 '26 03:05

wesbos


1 Answers

Have you tried Bundle update?

Also, highly recommend you use version control for Ruby - rvm is a great solution. https://rvm.io/

Then you can do rvm use ruby-version@myNewApp --create, then ditch --create everytime you use it or use .rvmrc and stick that line in there so it'll auto use nice clean versions of different gems depending for each app you create.

like image 159
Kai Vong Avatar answered Jun 02 '26 20:06

Kai Vong