Skip to content

Clarify local gem override docs to require git-sourced gems#9305

Merged
hsbt merged 2 commits intomasterfrom
add-doc-for-local-config
Feb 4, 2026
Merged

Clarify local gem override docs to require git-sourced gems#9305
hsbt merged 2 commits intomasterfrom
add-doc-for-local-config

Conversation

@hsbt
Copy link
Member

@hsbt hsbt commented Feb 4, 2026

Fixes #8595

@hsbt hsbt marked this pull request as ready for review February 4, 2026 07:16
Copilot AI review requested due to automatic review settings February 4, 2026 07:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the documentation for Bundler's local git repository override feature to clarify that it only works with git-sourced gems, not gems from RubyGems. This addresses a common source of confusion reported in issue #8595.

Changes:

  • Added an "Important" notice explaining that local overrides only work for git-sourced gems
  • Updated the example to show the required git source configuration
  • Added documentation for the alternative approach (using path sources) for RubyGems gems

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

For example, in order to use a local Rack repository, a developer could call:
Important: This feature only works for gems that are specified with a git
source in your Gemfile. It does not work for gems installed from RubyGems
or other sources. The gem must be defined with `git:` option pointing to a
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor grammar issue: should be "with a git: option" or "with the git: option" instead of "with git: option".

Suggested change
or other sources. The gem must be defined with `git:` option pointing to a
or other sources. The gem must be defined with the `git:` option pointing to a

Copilot uses AI. Check for mistakes.
Comment on lines 298 to 337
@@ -321,6 +330,11 @@ Finally, Bundler also ensures that the current revision in the
`Gemfile.lock` exists in the local git repository. By doing this, Bundler
forces you to fetch the latest changes in the remotes.

If you need to temporarily use a local version of a gem that is normally
installed from RubyGems (not from git), use a path source instead:

gem "rack", path: "~/Work/git/rack"

Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The corresponding generated man page file (bundle-config.1) should also be updated. You can regenerate it by running bin/rake bundler:man:build or similar rake task. The .1 file is the compiled roff format that gets installed and displayed when users run man bundle-config.

Copilot uses AI. Check for mistakes.
@hsbt hsbt merged commit d0f6a30 into master Feb 4, 2026
93 checks passed
@hsbt hsbt deleted the add-doc-for-local-config branch February 4, 2026 09:22
hsbt added a commit that referenced this pull request Feb 5, 2026
Clarify local gem override docs to require git-sourced gems

(cherry picked from commit d0f6a30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Local Git Repo override does not work

1 participant