You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bundler/lib/bundler/man/bundle-config.1
+18-2Lines changed: 18 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
.\" generated with Ronn-NG/v0.10.1
2
2
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
-
.TH "BUNDLE\-CONFIG" "1" "September 2025" ""
3
+
.TH "BUNDLE\-CONFIG" "1" "February 2026" ""
4
4
.SH "NAME"
5
5
\fBbundle\-config\fR\- Set bundler configuration options
6
6
.SH "SYNOPSIS"
@@ -248,7 +248,16 @@ bundle config set \-\-local local\.GEM_NAME /path/to/local/git/repository
248
248
.fi
249
249
.IP""0
250
250
.P
251
-
For example, in order to use a local Rack repository, a developer could call:
251
+
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 \fBgit:\fR option pointing to a remote repository\.
Then you can use a local Rack repository by running:
252
261
.IP""4
253
262
.nf
254
263
bundle config set \-\-local local\.rack ~/Work/git/rack
@@ -260,6 +269,13 @@ Now instead of checking out the remote git repository, the local override will b
260
269
Bundler does many checks to ensure a developer won't work with invalid references\. Particularly, we force a developer to specify a branch in the \fBGemfile\fR in order to use this feature\. If the branch specified in the \fBGemfile\fR and the current branch in the local git repository do not match, Bundler will abort\. This ensures that a developer is always working against the correct branches, and prevents accidental locking to a different branch\.
261
270
.P
262
271
Finally, Bundler also ensures that the current revision in the \fBGemfile\.lock\fR exists in the local git repository\. By doing this, Bundler forces you to fetch the latest changes in the remotes\.
272
+
.P
273
+
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:
274
+
.IP""4
275
+
.nf
276
+
gem "rack", path: "~/Work/git/rack"
277
+
.fi
278
+
.IP""0
263
279
.SH "MIRRORS OF GEM SOURCES"
264
280
Bundler supports overriding gem sources with mirrors\. This allows you to configure rubygems\.org as the gem source in your Gemfile while still using your mirror to fetch gems\.
0 commit comments