Skip to content
Latchkey

Bundler "git source ... is not yet checked out" in CI

A gem in your Gemfile comes from a git repository, and Bundler tried to load it before the working copy existed. The git revision was never cloned on this runner, usually because a restored cache held the metadata but not the checkout.

What this error means

bundle exec or a require fails with "The git source https://github.com/org/gem.git is not yet checked out. Please run bundle install before trying to start your application."

bundler
The git source https://github.com/org/gem.git is not yet checked out.
Please run `bundle install` before trying to start your application.

Common causes

A restored cache lacks the git checkout

The cache restored gem metadata or vendor paths but not the bundler/gems/.../<gem> git working copy, so Bundler has nothing to load.

bundle install was skipped before bundle exec

The job ran bundle exec without a prior successful bundle install, so the git revision was never cloned on this runner.

How to fix it

Run bundle install before exec

  1. Ensure a bundle install step runs and succeeds before any bundle exec.
  2. Include the git checkout directory in the cache path, not just vendor gems.
  3. Re-run so Bundler clones the git revision the lockfile records.
Terminal
bundle install --jobs 4
bundle exec rake

Cache the full bundle path

When caching with a custom path, cache the directory that holds git-sourced gems so the checkout survives between runs.

.github/workflows/ci.yml
- uses: actions/cache@v4
  with:
    path: vendor/bundle
    key: bundle-${{ hashFiles('Gemfile.lock') }}

How to prevent it

  • Always run bundle install before bundle exec in CI.
  • Cache the bundle path that contains git-sourced gem checkouts.
  • Pin git gems to a ref so the revision is deterministic.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →