Skip to content
Latchkey

Bundler "The path ... does not exist" for a Path Gem in CI

Your Gemfile references a gem with a path: source, and Bundler cannot find that directory on the runner. The local gem was never checked out, is ignored by git, or lives outside the cloned repository.

What this error means

bundle install fails with Bundler::PathError "The path ... does not exist", naming a directory a path: gem points at. It passes locally because the directory exists there but is absent on the runner.

bundler output
The path `/home/runner/work/app/app/../shared-lib` does not exist.

Bundler::PathError: The path `../shared-lib` does not exist.

Common causes

The path gem directory is not in the checkout

A path: gem points at a sibling directory or a folder that is gitignored. CI clones only the repo, so the referenced path is missing on the runner.

Wrong relative path on the runner

A relative path that resolves from your local layout points elsewhere in the CI workspace, where no such directory exists.

How to fix it

Make the path gem available in CI

  1. If the gem lives in a separate repo, check it out into the expected relative location (a submodule or an extra clone step).
  2. If it is gitignored, stop ignoring it so the directory is part of the checkout.
  3. Confirm the relative path resolves the same way on the runner as locally.

Or publish the gem instead of using a path

For a shared internal gem, a git source or a private gem server is more reproducible in CI than a local path.

Gemfile
gem 'shared-lib', git: 'https://github.com/example/shared-lib.git', tag: 'v1.2.0'

How to prevent it

  • Avoid path: gems pointing outside the repository in CI.
  • Use a git source or private gem server for shared internal gems.
  • If a path gem is required, vendor it inside the repo so it is always checked out.

Related guides

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