1 minute read

Imagine trying to run your blog with bundle exec jekyll serve or rake build and suddenly you are hit by this incompatible library error:

Traceback (most recent call last):
/Users/janmeppe/.rvm/gems/ruby-2.6.3/gems/nokogiri-1.10.10/lib/nokogiri.rb:30:in
`require': cannot load such file -- nokogiri/2.6/nokogiri (LoadError)

When I first encountered this error I had no idea what was going on. What happened in my case was that I ignored the security updates from Github pages too long. They fixed some security issues and if you use Github pages a bot makes automated pull requests. Obviously I ignored these security updates for too long and at some point - poof - things started breaking.

Anyway, here’s how you fix it.

Problem

You have an incompatible library version for nokogiri 1.1.0 and are using github pages.

This is the error you run into:

Traceback (most recent call last):
/Users/janmeppe/.rvm/gems/ruby-2.6.3/gems/nokogiri-1.10.10/lib/nokogiri.rb:30:in
`require': cannot load such file -- nokogiri/2.6/nokogiri (LoadError)

Solution

You should have gotten an automated pull request in your repo like this:

  1. Merge in this automated pull request to bump the nokogiri version
  2. Uninstall all gems with gem uninstall -aIx
  3. Install a new bundler gem install bundler
  4. Install your gems with bundle install

That should fix it!

Subscribe

Comments