Failing building Jekyll for Github pages - nokogiri issue

Hi, I’m trying to build a website with jekyll for github-pages.
At bundle install, I got this error:Because nokogiri = 1.16.2 depends on Ruby >= 3.0.0 and nokogiri >= 1.16.2, < 1.16.3 depends on Ruby >= 3.0.0, < 3.4.dev, nokogiri >= 1.16.2, < 1.16.3 requires Ruby >= 3.0.0.
I’m on Linux Manjaro using ruby 2.7.2, because I’ve read that this is the way for github-pages.
Can you please suggest me a solution? Thank you

Presumably you’re using the github-pages gem, which requires nokogiri?

Unfortunately, it appears that the github-pages gem has an out-of-date Ruby requirement. Nokogiri was updated a few months ago due to a security patch, and now the latest github-pages requires Ruby 3.

Ideally you should switch to Ruby 3 (2 is EOL-ed), but a workaround might be to use the previous version, github-pages 231.

1 Like

The best solution for you is to use a GitHub action that builds your site and upload it to your GitHub pages. We do it like this in our template site, check our deploy action.