Clarify local gem override docs to require git-sourced gems#9305
Clarify local gem override docs to require git-sourced gems#9305
Conversation
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Minor grammar issue: should be "with a git: option" or "with the git: option" instead of "with git: option".
| 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 |
| @@ -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" | |||
|
|
|||
There was a problem hiding this comment.
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.
Clarify local gem override docs to require git-sourced gems (cherry picked from commit d0f6a30)
Fixes #8595