Skip to content
Latchkey

Jekyll "Bundler could not find compatible versions for github-pages" in CI

The github-pages gem pins exact versions of Jekyll and its plugins to match GitHub Pages. When your Gemfile or Gemfile.lock asks for a different version, Bundler cannot find a compatible set and resolution fails.

What this error means

bundle install fails with "Bundler could not find compatible versions for gem 'jekyll'" (or another gem), pointing at github-pages and your direct dependency.

bundler
Bundler could not find compatible versions for gem "jekyll":
  In Gemfile:
    jekyll (~> 4.3)
    github-pages was resolved to 231, which depends on
      jekyll (= 3.9.5)

Common causes

A direct Jekyll pin conflicts with github-pages

github-pages locks Jekyll to a specific version; a gem "jekyll", "~> 4.3" line in the Gemfile cannot coexist with it.

A plugin version outside the github-pages set

A plugin pinned to a version github-pages does not allow makes the dependency set unsolvable.

How to fix it

Depend on github-pages, not a separate jekyll pin

  1. Remove the explicit gem "jekyll" line and let github-pages pull the right version.
  2. Drop plugin pins that conflict with the github-pages set.
  3. Run bundle update github-pages and commit the lockfile.
Gemfile
# Gemfile
gem "github-pages", group: :jekyll_plugins

Or drop github-pages and pin Jekyll yourself

If you build and deploy with Actions rather than the Pages gem, remove github-pages and manage Jekyll and plugin versions directly.

How to prevent it

  • Use github-pages to drive versions when targeting GitHub Pages, without a separate jekyll pin.
  • Avoid plugin pins outside the github-pages allowed set.
  • Commit Gemfile.lock so CI resolves the same versions.

Frequently asked questions

What causes ""could not find compatible versions ... github-pages""?
github-pages locks Jekyll to a specific version; a gem "jekyll", "~> 4.3" line in the Gemfile cannot coexist with it.
How do I fix "could not find compatible versions ... github-pages"?
Depend on github-pages, not a separate jekyll pin

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card