summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2026-02-04 16:15:29 +0900
committergit <svn-admin@ruby-lang.org>2026-02-04 09:22:34 +0000
commit395ad09c826db156a79bb763f16215bed68d1b7e (patch)
tree02835b30e11cd0776cbbc77284fab8f5b020085b /lib
parentc3b6f2e9a2575ea5be0c49fb77ae051fe7981789 (diff)
[ruby/rubygems] Clarify local gem override docs to require git-sourced gems
https://github.com/ruby/rubygems/commit/a4a5cdb12c
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/man/bundle-config.1.ronn16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/bundler/man/bundle-config.1.ronn b/lib/bundler/man/bundle-config.1.ronn
index 7c34f1d1af..eb5a3b045b 100644
--- a/lib/bundler/man/bundle-config.1.ronn
+++ b/lib/bundler/man/bundle-config.1.ronn
@@ -295,7 +295,16 @@ up a local override:
bundle config set --local local.GEM_NAME /path/to/local/git/repository
-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
+remote repository.
+
+For example, if your Gemfile contains:
+
+ gem "rack", git: "https://github.com/rack/rack.git", branch: "main"
+
+Then you can use a local Rack repository by running:
bundle config set --local local.rack ~/Work/git/rack
@@ -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"
+
## MIRRORS OF GEM SOURCES
Bundler supports overriding gem sources with mirrors. This allows you to