bundler 2.6.9 → 4.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +2212 -1879
  3. data/README.md +11 -11
  4. data/bundler.gemspec +5 -5
  5. data/lib/bundler/build_metadata.rb +10 -11
  6. data/lib/bundler/capistrano.rb +1 -19
  7. data/lib/bundler/checksum.rb +6 -0
  8. data/lib/bundler/cli/add.rb +10 -0
  9. data/lib/bundler/cli/cache.rb +1 -12
  10. data/lib/bundler/cli/common.rb +21 -4
  11. data/lib/bundler/cli/config.rb +1 -2
  12. data/lib/bundler/cli/console.rb +5 -0
  13. data/lib/bundler/cli/exec.rb +29 -4
  14. data/lib/bundler/cli/gem.rb +89 -63
  15. data/lib/bundler/cli/install.rb +15 -90
  16. data/lib/bundler/cli/issue.rb +2 -2
  17. data/lib/bundler/cli/list.rb +33 -2
  18. data/lib/bundler/cli/lock.rb +5 -5
  19. data/lib/bundler/cli/outdated.rb +1 -1
  20. data/lib/bundler/cli/plugin.rb +5 -1
  21. data/lib/bundler/cli/pristine.rb +5 -1
  22. data/lib/bundler/cli/show.rb +3 -7
  23. data/lib/bundler/cli/update.rb +5 -5
  24. data/lib/bundler/cli.rb +162 -127
  25. data/lib/bundler/compact_index_client.rb +1 -6
  26. data/lib/bundler/current_ruby.rb +17 -5
  27. data/lib/bundler/definition.rb +199 -117
  28. data/lib/bundler/dependency.rb +1 -1
  29. data/lib/bundler/deployment.rb +1 -64
  30. data/lib/bundler/digest.rb +1 -1
  31. data/lib/bundler/dsl.rb +48 -48
  32. data/lib/bundler/environment_preserver.rb +1 -0
  33. data/lib/bundler/errors.rb +1 -5
  34. data/lib/bundler/feature_flag.rb +5 -35
  35. data/lib/bundler/fetcher/compact_index.rb +1 -1
  36. data/lib/bundler/fetcher/dependency.rb +9 -2
  37. data/lib/bundler/fetcher/downloader.rb +33 -8
  38. data/lib/bundler/fetcher/gem_remote_fetcher.rb +6 -0
  39. data/lib/bundler/fetcher.rb +49 -19
  40. data/lib/bundler/friendly_errors.rb +4 -3
  41. data/lib/bundler/index.rb +7 -9
  42. data/lib/bundler/injector.rb +1 -2
  43. data/lib/bundler/inline.rb +9 -1
  44. data/lib/bundler/installer/gem_installer.rb +14 -11
  45. data/lib/bundler/installer/parallel_installer.rb +63 -17
  46. data/lib/bundler/installer.rb +6 -19
  47. data/lib/bundler/lazy_specification.rb +47 -20
  48. data/lib/bundler/lockfile_generator.rb +1 -1
  49. data/lib/bundler/lockfile_parser.rb +11 -5
  50. data/lib/bundler/man/bundle-add.1 +1 -1
  51. data/lib/bundler/man/bundle-binstubs.1 +3 -6
  52. data/lib/bundler/man/bundle-binstubs.1.ronn +4 -6
  53. data/lib/bundler/man/bundle-cache.1 +2 -14
  54. data/lib/bundler/man/bundle-cache.1.ronn +1 -14
  55. data/lib/bundler/man/bundle-check.1 +2 -5
  56. data/lib/bundler/man/bundle-check.1.ronn +0 -5
  57. data/lib/bundler/man/bundle-clean.1 +1 -1
  58. data/lib/bundler/man/bundle-config.1 +206 -148
  59. data/lib/bundler/man/bundle-config.1.ronn +135 -118
  60. data/lib/bundler/man/bundle-console.1 +1 -1
  61. data/lib/bundler/man/bundle-doctor.1 +43 -4
  62. data/lib/bundler/man/bundle-doctor.1.ronn +48 -4
  63. data/lib/bundler/man/bundle-env.1 +1 -1
  64. data/lib/bundler/man/bundle-exec.1 +2 -5
  65. data/lib/bundler/man/bundle-exec.1.ronn +1 -5
  66. data/lib/bundler/man/bundle-fund.1 +1 -1
  67. data/lib/bundler/man/bundle-gem.1 +64 -44
  68. data/lib/bundler/man/bundle-gem.1.ronn +10 -9
  69. data/lib/bundler/man/bundle-help.1 +1 -1
  70. data/lib/bundler/man/bundle-info.1 +1 -1
  71. data/lib/bundler/man/bundle-init.1 +1 -1
  72. data/lib/bundler/man/bundle-install.1 +16 -59
  73. data/lib/bundler/man/bundle-install.1.ronn +27 -108
  74. data/lib/bundler/man/bundle-issue.1 +1 -1
  75. data/lib/bundler/man/bundle-licenses.1 +1 -1
  76. data/lib/bundler/man/bundle-list.1 +6 -1
  77. data/lib/bundler/man/bundle-list.1.ronn +5 -0
  78. data/lib/bundler/man/bundle-lock.1 +1 -1
  79. data/lib/bundler/man/bundle-open.1 +1 -1
  80. data/lib/bundler/man/bundle-outdated.1 +1 -1
  81. data/lib/bundler/man/bundle-platform.1 +1 -1
  82. data/lib/bundler/man/bundle-plugin.1 +33 -15
  83. data/lib/bundler/man/bundle-plugin.1.ronn +36 -15
  84. data/lib/bundler/man/bundle-pristine.1 +1 -1
  85. data/lib/bundler/man/bundle-remove.1 +2 -8
  86. data/lib/bundler/man/bundle-remove.1.ronn +1 -8
  87. data/lib/bundler/man/bundle-show.1 +2 -5
  88. data/lib/bundler/man/bundle-show.1.ronn +0 -4
  89. data/lib/bundler/man/bundle-update.1 +5 -5
  90. data/lib/bundler/man/bundle-update.1.ronn +4 -4
  91. data/lib/bundler/man/bundle-version.1 +1 -1
  92. data/lib/bundler/man/bundle.1 +1 -10
  93. data/lib/bundler/man/bundle.1.ronn +0 -9
  94. data/lib/bundler/man/gemfile.5 +32 -1
  95. data/lib/bundler/man/gemfile.5.ronn +28 -0
  96. data/lib/bundler/man/index.txt +0 -2
  97. data/lib/bundler/match_platform.rb +31 -12
  98. data/lib/bundler/materialization.rb +3 -3
  99. data/lib/bundler/plugin/api/source.rb +8 -0
  100. data/lib/bundler/plugin/index.rb +6 -0
  101. data/lib/bundler/plugin/installer.rb +2 -11
  102. data/lib/bundler/plugin/source_list.rb +1 -1
  103. data/lib/bundler/plugin.rb +7 -4
  104. data/lib/bundler/resolver/package.rb +2 -1
  105. data/lib/bundler/resolver/strategy.rb +6 -3
  106. data/lib/bundler/resolver.rb +20 -4
  107. data/lib/bundler/retry.rb +30 -4
  108. data/lib/bundler/ruby_dsl.rb +17 -12
  109. data/lib/bundler/ruby_version.rb +1 -3
  110. data/lib/bundler/rubygems_ext.rb +117 -121
  111. data/lib/bundler/rubygems_gem_installer.rb +5 -4
  112. data/lib/bundler/rubygems_integration.rb +13 -12
  113. data/lib/bundler/runtime.rb +14 -3
  114. data/lib/bundler/self_manager.rb +34 -43
  115. data/lib/bundler/settings/validator.rb +5 -21
  116. data/lib/bundler/settings.rb +17 -32
  117. data/lib/bundler/shared_helpers.rb +12 -18
  118. data/lib/bundler/source/gemspec.rb +4 -0
  119. data/lib/bundler/source/git/git_proxy.rb +55 -29
  120. data/lib/bundler/source/git.rb +2 -3
  121. data/lib/bundler/source/path.rb +12 -7
  122. data/lib/bundler/source/rubygems.rb +59 -43
  123. data/lib/bundler/source/rubygems_aggregate.rb +4 -1
  124. data/lib/bundler/source.rb +3 -1
  125. data/lib/bundler/source_list.rb +5 -50
  126. data/lib/bundler/source_map.rb +8 -7
  127. data/lib/bundler/spec_set.rb +9 -14
  128. data/lib/bundler/stub_specification.rb +1 -0
  129. data/lib/bundler/templates/Executable +0 -11
  130. data/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +7 -129
  131. data/lib/bundler/templates/newgem/Cargo.toml.tt +6 -0
  132. data/lib/bundler/templates/newgem/Rakefile.tt +5 -0
  133. data/lib/bundler/templates/newgem/circleci/config.yml.tt +12 -0
  134. data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +8 -1
  135. data/lib/bundler/templates/newgem/ext/newgem/build.rs.tt +5 -0
  136. data/lib/bundler/templates/newgem/ext/newgem/extconf-go.rb.tt +11 -0
  137. data/lib/bundler/templates/newgem/ext/newgem/go.mod.tt +5 -0
  138. data/lib/bundler/templates/newgem/ext/newgem/newgem-go.c.tt +2 -0
  139. data/lib/bundler/templates/newgem/ext/newgem/newgem.go.tt +31 -0
  140. data/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +13 -2
  141. data/lib/bundler/templates/newgem/github/workflows/build-gems.yml.tt +69 -0
  142. data/lib/bundler/templates/newgem/github/workflows/main.yml.tt +12 -1
  143. data/lib/bundler/templates/newgem/gitlab-ci.yml.tt +9 -0
  144. data/lib/bundler/templates/newgem/lib/newgem.rb.tt +1 -1
  145. data/lib/bundler/templates/newgem/newgem.gemspec.tt +10 -10
  146. data/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +8 -0
  147. data/lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt +6 -0
  148. data/lib/bundler/ui/shell.rb +12 -8
  149. data/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +26 -23
  150. data/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +1 -1
  151. data/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +50 -6
  152. data/lib/bundler/vendor/fileutils/lib/fileutils.rb +57 -52
  153. data/lib/bundler/vendor/net-http-persistent/README.rdoc +1 -1
  154. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +2 -1
  155. data/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +84 -42
  156. data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +42 -6
  157. data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +1 -1
  158. data/lib/bundler/vendor/thor/lib/thor/runner.rb +2 -2
  159. data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +3 -7
  160. data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
  161. data/lib/bundler/vendor/thor/lib/thor.rb +1 -1
  162. data/lib/bundler/vendor/uri/lib/uri/common.rb +57 -15
  163. data/lib/bundler/vendor/uri/lib/uri/file.rb +1 -1
  164. data/lib/bundler/vendor/uri/lib/uri/generic.rb +34 -21
  165. data/lib/bundler/vendor/uri/lib/uri/http.rb +12 -0
  166. data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +9 -8
  167. data/lib/bundler/vendor/uri/lib/uri/version.rb +2 -2
  168. data/lib/bundler/version.rb +10 -2
  169. data/lib/bundler/vlad.rb +1 -14
  170. data/lib/bundler/worker.rb +12 -4
  171. data/lib/bundler.rb +20 -40
  172. metadata +13 -25
  173. data/lib/bundler/cli/inject.rb +0 -60
  174. data/lib/bundler/cli/viz.rb +0 -31
  175. data/lib/bundler/gem_helpers.rb +0 -144
  176. data/lib/bundler/graph.rb +0 -152
  177. data/lib/bundler/man/bundle-inject.1 +0 -31
  178. data/lib/bundler/man/bundle-inject.1.ronn +0 -32
  179. data/lib/bundler/man/bundle-viz.1 +0 -30
  180. data/lib/bundler/man/bundle-viz.1.ronn +0 -36
  181. data/lib/bundler/similarity_detector.rb +0 -63
  182. data/lib/bundler/templates/Executable.bundler +0 -109
  183. data/lib/bundler/vendor/connection_pool/.document +0 -1
  184. data/lib/bundler/vendor/fileutils/.document +0 -1
  185. data/lib/bundler/vendor/net-http-persistent/.document +0 -1
  186. data/lib/bundler/vendor/pub_grub/.document +0 -1
  187. data/lib/bundler/vendor/securerandom/.document +0 -1
  188. data/lib/bundler/vendor/thor/.document +0 -1
  189. data/lib/bundler/vendor/tsort/.document +0 -1
  190. data/lib/bundler/vendor/uri/.document +0 -1
@@ -3,10 +3,10 @@ bundle-config(1) -- Set bundler configuration options
3
3
 
4
4
  ## SYNOPSIS
5
5
 
6
- `bundle config` list<br>
7
- `bundle config` [get] NAME<br>
8
- `bundle config` [set] NAME VALUE<br>
9
- `bundle config` unset NAME
6
+ `bundle config` [list]<br>
7
+ `bundle config` [get [--local|--global]] NAME<br>
8
+ `bundle config` [set [--local|--global]] NAME VALUE<br>
9
+ `bundle config` unset [--local|--global] NAME
10
10
 
11
11
  ## DESCRIPTION
12
12
 
@@ -19,103 +19,67 @@ Bundler loads configuration settings in this order:
19
19
  3. Global config (`~/.bundle/config`)
20
20
  4. Bundler default config
21
21
 
22
- Executing `bundle config list` will print a list of all bundler
23
- configuration for the current bundle, and where that configuration
24
- was set.
25
-
26
- Executing `bundle config get <name>` will print the value of that configuration
27
- setting, and where it was set.
28
-
29
- Executing `bundle config set <name> <value>` defaults to setting `local`
30
- configuration if executing from within a local application, otherwise it will
31
- set `global` configuration. See `--local` and `--global` options below.
32
-
33
- Executing `bundle config set --local <name> <value>` will set that configuration
34
- in the directory for the local application. The configuration will be stored in
35
- `<project_root>/.bundle/config`. If `BUNDLE_APP_CONFIG` is set, the configuration
36
- will be stored in `$BUNDLE_APP_CONFIG/config`.
37
-
38
- Executing `bundle config set --global <name> <value>` will set that
39
- configuration to the value specified for all bundles executed as the current
40
- user. The configuration will be stored in `~/.bundle/config`. If <name> already
41
- is set, <name> will be overridden and user will be warned.
42
-
43
- Executing `bundle config unset <name>` will delete the configuration in both
44
- local and global sources.
45
-
46
- Executing `bundle config unset --global <name>` will delete the configuration
47
- only from the user configuration.
48
-
49
- Executing `bundle config unset --local <name>` will delete the configuration
50
- only from the local application.
51
-
52
- Executing bundle with the `BUNDLE_IGNORE_CONFIG` environment variable set will
22
+ Executing `bundle` with the `BUNDLE_IGNORE_CONFIG` environment variable set will
53
23
  cause it to ignore all configuration.
54
24
 
55
- ## REMEMBERING OPTIONS
25
+ ## SUB-COMMANDS
56
26
 
57
- Flags passed to `bundle install` or the Bundler runtime, such as `--path foo` or
58
- `--without production`, are remembered between commands and saved to your local
59
- application's configuration (normally, `./.bundle/config`).
27
+ ### list (default command)
60
28
 
61
- However, this will be changed in bundler 3, so it's better not to rely on this
62
- behavior. If these options must be remembered, it's better to set them using
63
- `bundle config` (e.g., `bundle config set --local path foo`).
29
+ Executing `bundle config list` will print a list of all bundler
30
+ configuration for the current bundle, and where that configuration
31
+ was set.
64
32
 
65
- The options that can be configured are:
33
+ ### get
66
34
 
67
- * `bin`:
68
- Creates a directory (defaults to `~/bin`) and place any executables from the
69
- gem there. These executables run in Bundler's context. If used, you might add
70
- this directory to your environment's `PATH` variable. For instance, if the
71
- `rails` gem comes with a `rails` executable, this flag will create a
72
- `bin/rails` executable that ensures that all referred dependencies will be
73
- resolved using the bundled gems.
35
+ Executing `bundle config get <name>` will print the value of that configuration
36
+ setting, and all locations where it was set.
74
37
 
75
- * `deployment`:
76
- In deployment mode, Bundler will 'roll-out' the bundle for
77
- `production` use. Please check carefully if you want to have this option
78
- enabled in `development` or `test` environments.
38
+ **OPTIONS**
79
39
 
80
- * `only`:
81
- A space-separated list of groups to install only gems of the specified groups.
82
- Please check carefully if you want to install also gems without a group, cause
83
- they get put inside `default` group. For example `only test:default` will install
84
- all gems specified in test group and without one.
40
+ * `--local`:
41
+ Get configuration from configuration file for the local application, namely,
42
+ `<project_root>/.bundle/config`, or `$BUNDLE_APP_CONFIG/config` if
43
+ `BUNDLE_APP_CONFIG` is set.
85
44
 
86
- * `path`:
87
- The location to install the specified gems to. This defaults to Rubygems'
88
- setting. Bundler shares this location with Rubygems, `gem install ...` will
89
- have gem installed there, too. Therefore, gems installed without a
90
- `--path ...` setting will show up by calling `gem list`. Accordingly, gems
91
- installed to other locations will not get listed.
45
+ * `--global`:
46
+ Get configuration from configuration file global to all bundles executed as
47
+ the current user, namely, from `~/.bundle/config`.
92
48
 
93
- * `without`:
94
- A space-separated or `:`-separated list of groups referencing gems to skip during
95
- installation.
49
+ ### set
96
50
 
97
- * `with`:
98
- A space-separated or `:`-separated list of **optional** groups referencing gems to
99
- include during installation.
51
+ Executing `bundle config set <name> <value>` defaults to setting `local`
52
+ configuration if executing from within a local application, otherwise it will
53
+ set `global` configuration.
100
54
 
101
- ## BUILD OPTIONS
55
+ **OPTIONS**
102
56
 
103
- You can use `bundle config` to give Bundler the flags to pass to the gem
104
- installer every time bundler tries to install a particular gem.
57
+ * `--local`:
58
+ Executing `bundle config set --local <name> <value>` will set that configuration
59
+ in the directory for the local application. The configuration will be stored in
60
+ `<project_root>/.bundle/config`. If `BUNDLE_APP_CONFIG` is set, the configuration
61
+ will be stored in `$BUNDLE_APP_CONFIG/config`.
105
62
 
106
- A very common example, the `mysql` gem, requires Snow Leopard users to
107
- pass configuration flags to `gem install` to specify where to find the
108
- `mysql_config` executable.
63
+ * `--global`:
64
+ Executing `bundle config set --global <name> <value>` will set that
65
+ configuration to the value specified for all bundles executed as the current
66
+ user. The configuration will be stored in `~/.bundle/config`. If <name> already
67
+ is set, <name> will be overridden and user will be warned.
109
68
 
110
- gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
69
+ ### unset
111
70
 
112
- Since the specific location of that executable can change from machine
113
- to machine, you can specify these flags on a per-machine basis.
71
+ Executing `bundle config unset <name>` will delete the configuration in both
72
+ local and global sources.
114
73
 
115
- bundle config set --global build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config
74
+ **OPTIONS**
116
75
 
117
- After running this command, every time bundler needs to install the
118
- `mysql` gem, it will pass along the flags you specified.
76
+ * `--local`:
77
+ Executing `bundle config unset --local <name>` will delete the configuration
78
+ only from the local application.
79
+
80
+ * `--global`:
81
+ Executing `bundle config unset --global <name>` will delete the configuration
82
+ only from the user configuration.
119
83
 
120
84
  ## CONFIGURATION KEYS
121
85
 
@@ -142,19 +106,25 @@ the environment variable `BUNDLE_LOCAL__RACK`.
142
106
  The following is a list of all configuration keys and their purpose. You can
143
107
  learn more about their operation in [bundle install(1)](bundle-install.1.html).
144
108
 
145
- * `allow_offline_install` (`BUNDLE_ALLOW_OFFLINE_INSTALL`):
146
- Allow Bundler to use cached data when installing without network access.
147
- * `auto_clean_without_path` (`BUNDLE_AUTO_CLEAN_WITHOUT_PATH`):
148
- Automatically run `bundle clean` after installing when an explicit `path`
149
- has not been set and Bundler is not installing into the system gems.
109
+ * `api_request_size` (`BUNDLE_API_REQUEST_SIZE`):
110
+ Configure how many dependencies to fetch when resolving the specifications.
111
+ This configuration is only used when fetchig specifications from RubyGems
112
+ servers that didn't implement the Compact Index API.
113
+ Defaults to 100.
150
114
  * `auto_install` (`BUNDLE_AUTO_INSTALL`):
151
115
  Automatically run `bundle install` when gems are missing.
152
116
  * `bin` (`BUNDLE_BIN`):
153
- Install executables from gems in the bundle to the specified directory.
154
- Defaults to `false`.
117
+ If configured, `bundle binstubs` will install executables from gems in the
118
+ bundle to the specified directory. Otherwise it will create them in a `bin`
119
+ directory relative to the Gemfile directory. These executables run in
120
+ Bundler's context. If used, you might add this directory to your
121
+ environment's `PATH` variable. For instance, if the `rails` gem comes with a
122
+ `rails` executable, `bundle binstubs` will create a `bin/rails` executable
123
+ that ensures that all referred dependencies will be resolved using the
124
+ bundled gems.
155
125
  * `cache_all` (`BUNDLE_CACHE_ALL`):
156
126
  Cache all gems, including path and git gems. This needs to be explicitly
157
- configured on bundler 1 and bundler 2, but will be the default on bundler 3.
127
+ before bundler 4, but will be the default on bundler 4.
158
128
  * `cache_all_platforms` (`BUNDLE_CACHE_ALL_PLATFORMS`):
159
129
  Cache gems for all platforms.
160
130
  * `cache_path` (`BUNDLE_CACHE_PATH`):
@@ -163,15 +133,16 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
163
133
  Defaults to `vendor/cache`.
164
134
  * `clean` (`BUNDLE_CLEAN`):
165
135
  Whether Bundler should run `bundle clean` automatically after
166
- `bundle install`.
136
+ `bundle install`. Defaults to `true` in Bundler 4, as long as `path` is not
137
+ explicitly configured.
167
138
  * `console` (`BUNDLE_CONSOLE`):
168
139
  The console that `bundle console` starts. Defaults to `irb`.
169
- * `default_install_uses_path` (`BUNDLE_DEFAULT_INSTALL_USES_PATH`):
170
- Whether a `bundle install` without an explicit `--path` argument defaults
171
- to installing gems in `.bundle`.
140
+ * `default_cli_command` (`BUNDLE_DEFAULT_CLI_COMMAND`):
141
+ The command that running `bundle` without arguments should run. Defaults to
142
+ `cli_help` since Bundler 4, but can also be `install` which was the previous
143
+ default.
172
144
  * `deployment` (`BUNDLE_DEPLOYMENT`):
173
- Disallow changes to the `Gemfile`. When the `Gemfile` is changed and the
174
- lockfile has not been updated, running Bundler commands will be blocked.
145
+ Equivalent to setting `frozen` to `true` and `path` to `vendor/bundle`.
175
146
  * `disable_checksum_validation` (`BUNDLE_DISABLE_CHECKSUM_VALIDATION`):
176
147
  Allow installing gems even if they do not match the checksum provided by
177
148
  RubyGems.
@@ -193,12 +164,13 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
193
164
  Ignore the current machine's platform and install only `ruby` platform gems.
194
165
  As a result, gems with native extensions will be compiled from source.
195
166
  * `frozen` (`BUNDLE_FROZEN`):
196
- Disallow changes to the `Gemfile`. When the `Gemfile` is changed and the
197
- lockfile has not been updated, running Bundler commands will be blocked.
198
- Defaults to `true` when `--deployment` is used.
167
+ Disallow any automatic changes to `Gemfile.lock`. Bundler commands will
168
+ be blocked unless the lockfile can be installed exactly as written.
169
+ Usually this will happen when changing the `Gemfile` manually and forgetting
170
+ to update the lockfile through `bundle lock` or `bundle install`.
199
171
  * `gem.github_username` (`BUNDLE_GEM__GITHUB_USERNAME`):
200
- Sets a GitHub username or organization to be used in `README` file when you
201
- create a new gem via `bundle gem` command. It can be overridden by passing an
172
+ Sets a GitHub username or organization to be used in the `README` and `.gemspec` files
173
+ when you create a new gem via `bundle gem` command. It can be overridden by passing an
202
174
  explicit `--github-username` flag to `bundle gem`.
203
175
  * `gem.push_key` (`BUNDLE_GEM__PUSH_KEY`):
204
176
  Sets the `--key` parameter for `gem push` when using the `rake release`
@@ -210,8 +182,8 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
210
182
  will search up from the current working directory until it finds a
211
183
  `Gemfile`.
212
184
  * `global_gem_cache` (`BUNDLE_GLOBAL_GEM_CACHE`):
213
- Whether Bundler should cache all gems globally, rather than locally to the
214
- installing Ruby installation.
185
+ Whether Bundler should cache all gems and compiled extensions globally,
186
+ rather than locally to the configured installation path.
215
187
  * `ignore_funding_requests` (`BUNDLE_IGNORE_FUNDING_REQUESTS`):
216
188
  When set, no funding requests will be printed.
217
189
  * `ignore_messages` (`BUNDLE_IGNORE_MESSAGES`):
@@ -220,38 +192,43 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
220
192
  * `init_gems_rb` (`BUNDLE_INIT_GEMS_RB`):
221
193
  Generate a `gems.rb` instead of a `Gemfile` when running `bundle init`.
222
194
  * `jobs` (`BUNDLE_JOBS`):
223
- The number of gems Bundler can install in parallel. Defaults to the number of
224
- available processors.
195
+ The number of gems Bundler can download and install in parallel.
196
+ Defaults to the number of available processors.
197
+ * `lockfile` (`BUNDLE_LOCKFILE`):
198
+ The path to the lockfile that bundler should use. By default, Bundler adds
199
+ `.lock` to the end of the `gemfile` entry. Can be set to `false` in the
200
+ Gemfile to disable lockfile creation entirely (see gemfile(5)).
225
201
  * `lockfile_checksums` (`BUNDLE_LOCKFILE_CHECKSUMS`):
226
- Whether Bundler should include a checksums section in new lockfiles, to protect from compromised gem sources.
202
+ Whether Bundler should include a checksums section in new lockfiles, to protect from compromised gem sources. Defaults to true.
227
203
  * `no_install` (`BUNDLE_NO_INSTALL`):
228
204
  Whether `bundle package` should skip installing gems.
229
205
  * `no_prune` (`BUNDLE_NO_PRUNE`):
230
206
  Whether Bundler should leave outdated gems unpruned when caching.
231
207
  * `only` (`BUNDLE_ONLY`):
232
208
  A space-separated list of groups to install only gems of the specified groups.
209
+ Please check carefully if you want to install also gems without a group, because
210
+ they get put inside `default` group. For example `only test:default` will install
211
+ all gems specified in test group and without one.
233
212
  * `path` (`BUNDLE_PATH`):
234
213
  The location on disk where all gems in your bundle will be located regardless
235
214
  of `$GEM_HOME` or `$GEM_PATH` values. Bundle gems not found in this location
236
- will be installed by `bundle install`. Defaults to `Gem.dir`. When --deployment
237
- is used, defaults to vendor/bundle.
215
+ will be installed by `bundle install`. When not set, Bundler install by
216
+ default to a `.bundle` directory relative to repository root in Bundler 4,
217
+ and to the default system path (`Gem.dir`) before Bundler 4. That means that
218
+ before Bundler 4, Bundler shares this location with Rubygems, and `gem
219
+ install ...` will have gems installed in the same location and therefore,
220
+ gems installed without `path` set will show up by calling `gem list`. This
221
+ will not be the case in Bundler 4.
238
222
  * `path.system` (`BUNDLE_PATH__SYSTEM`):
239
223
  Whether Bundler will install gems into the default system path (`Gem.dir`).
240
- * `path_relative_to_cwd` (`BUNDLE_PATH_RELATIVE_TO_CWD`)
241
- Makes `--path` relative to the CWD instead of the `Gemfile`.
242
224
  * `plugins` (`BUNDLE_PLUGINS`):
243
225
  Enable Bundler's experimental plugin system.
244
226
  * `prefer_patch` (BUNDLE_PREFER_PATCH):
245
227
  Prefer updating only to next patch version during updates. Makes `bundle update` calls equivalent to `bundler update --patch`.
246
- * `print_only_version_number` (`BUNDLE_PRINT_ONLY_VERSION_NUMBER`):
247
- Print only version number from `bundler --version`.
248
228
  * `redirect` (`BUNDLE_REDIRECT`):
249
229
  The number of redirects allowed for network requests. Defaults to `5`.
250
230
  * `retry` (`BUNDLE_RETRY`):
251
231
  The number of times to retry failed network requests. Defaults to `3`.
252
- * `setup_makes_kernel_gem_public` (`BUNDLE_SETUP_MAKES_KERNEL_GEM_PUBLIC`):
253
- Have `Bundler.setup` make the `Kernel#gem` method public, even though
254
- RubyGems declares it as private.
255
232
  * `shebang` (`BUNDLE_SHEBANG`):
256
233
  The program name that should be invoked for generated binstubs. Defaults to
257
234
  the ruby install name used to generate the binstub.
@@ -260,6 +237,10 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
260
237
  be changed in the next major version.
261
238
  * `silence_root_warning` (`BUNDLE_SILENCE_ROOT_WARNING`):
262
239
  Silence the warning Bundler prints when installing gems as root.
240
+ * `simulate_version` (`BUNDLE_SIMULATE_VERSION`):
241
+ The virtual version Bundler should use for activating feature flags. Can be
242
+ used to simulate all the new functionality that will be enabled in a future
243
+ major version.
263
244
  * `ssl_ca_cert` (`BUNDLE_SSL_CA_CERT`):
264
245
  Path to a designated CA certificate file or folder containing multiple
265
246
  certificates for trusted CAs in PEM format.
@@ -278,6 +259,9 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
278
259
  and disallow passing no options to `bundle update`.
279
260
  * `user_agent` (`BUNDLE_USER_AGENT`):
280
261
  The custom user agent fragment Bundler includes in API requests.
262
+ * `verbose` (`BUNDLE_VERBOSE`):
263
+ Whether Bundler should print verbose output. Defaults to `false`, unless the
264
+ `--verbose` CLI flag is used.
281
265
  * `version` (`BUNDLE_VERSION`):
282
266
  The version of Bundler to use when running under Bundler environment.
283
267
  Defaults to `lockfile`. You can also specify `system` or `x.y.z`.
@@ -289,6 +273,25 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
289
273
  * `without` (`BUNDLE_WITHOUT`):
290
274
  A space-separated or `:`-separated list of groups whose gems bundler should not install.
291
275
 
276
+ ## BUILD OPTIONS
277
+
278
+ You can use `bundle config` to give Bundler the flags to pass to the gem
279
+ installer every time bundler tries to install a particular gem.
280
+
281
+ A very common example, the `mysql` gem, requires Snow Leopard users to
282
+ pass configuration flags to `gem install` to specify where to find the
283
+ `mysql_config` executable.
284
+
285
+ gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
286
+
287
+ Since the specific location of that executable can change from machine
288
+ to machine, you can specify these flags on a per-machine basis.
289
+
290
+ bundle config set --global build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config
291
+
292
+ After running this command, every time bundler needs to install the
293
+ `mysql` gem, it will pass along the flags you specified.
294
+
292
295
  ## LOCAL GIT REPOS
293
296
 
294
297
  Bundler also allows you to work against a git repository locally
@@ -297,7 +300,16 @@ up a local override:
297
300
 
298
301
  bundle config set --local local.GEM_NAME /path/to/local/git/repository
299
302
 
300
- For example, in order to use a local Rack repository, a developer could call:
303
+ Important: This feature only works for gems that are specified with a git
304
+ source in your Gemfile. It does not work for gems installed from RubyGems
305
+ or other sources. The gem must be defined with `git:` option pointing to a
306
+ remote repository.
307
+
308
+ For example, if your Gemfile contains:
309
+
310
+ gem "rack", git: "https://github.com/rack/rack.git", branch: "main"
311
+
312
+ Then you can use a local Rack repository by running:
301
313
 
302
314
  bundle config set --local local.rack ~/Work/git/rack
303
315
 
@@ -323,6 +335,11 @@ Finally, Bundler also ensures that the current revision in the
323
335
  `Gemfile.lock` exists in the local git repository. By doing this, Bundler
324
336
  forces you to fetch the latest changes in the remotes.
325
337
 
338
+ If you need to temporarily use a local version of a gem that is normally
339
+ installed from RubyGems (not from git), use a path source instead:
340
+
341
+ gem "rack", path: "~/Work/git/rack"
342
+
326
343
  ## MIRRORS OF GEM SOURCES
327
344
 
328
345
  Bundler supports overriding gem sources with mirrors. This allows you to
@@ -366,7 +383,7 @@ Or you can set the credentials as an environment variable like this:
366
383
 
367
384
  For gems with a git source with HTTP(S) URL you can specify credentials like so:
368
385
 
369
- bundle config set --global https://github.com/rubygems/rubygems.git username:password
386
+ bundle config set --global https://github.com/ruby/rubygems.git username:password
370
387
 
371
388
  Or you can set the credentials as an environment variable like so:
372
389
 
@@ -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\-CONSOLE" "1" "March 2025" ""
3
+ .TH "BUNDLE\-CONSOLE" "1" "March 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-console\fR \- Open an IRB session with the bundle pre\-loaded
6
6
  .SH "SYNOPSIS"
@@ -1,14 +1,21 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-DOCTOR" "1" "March 2025" ""
3
+ .TH "BUNDLE\-DOCTOR" "1" "March 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-doctor\fR \- Checks the bundle for common problems
6
6
  .SH "SYNOPSIS"
7
- \fBbundle doctor\fR [\-\-quiet] [\-\-gemfile=GEMFILE]
7
+ \fBbundle doctor [diagnose]\fR [\-\-quiet] [\-\-gemfile=GEMFILE] [\-\-ssl]
8
+ .br
9
+ \fBbundle doctor ssl\fR [\-\-host=HOST] [\-\-tls\-version=TLS\-VERSION] [\-\-verify\-mode=VERIFY\-MODE]
10
+ .br
11
+ \fBbundle doctor\fR help [COMMAND]
8
12
  .SH "DESCRIPTION"
13
+ You can diagnose common Bundler problems with this command such as checking gem environment or SSL/TLS issue\.
14
+ .SH "SUB\-COMMANDS"
15
+ .SS "diagnose (default command)"
9
16
  Checks your Gemfile and gem environment for common problems\. If issues are detected, Bundler prints them and exits status 1\. Otherwise, Bundler prints a success message and exits status 0\.
10
17
  .P
11
- Examples of common problems caught by bundle\-doctor include:
18
+ Examples of common problems caught include:
12
19
  .IP "\(bu" 4
13
20
  Invalid Bundler settings
14
21
  .IP "\(bu" 4
@@ -20,11 +27,43 @@ Uninstalled gems
20
27
  .IP "\(bu" 4
21
28
  Missing dependencies
22
29
  .IP "" 0
23
- .SH "OPTIONS"
30
+ .P
31
+ \fBOPTIONS\fR
24
32
  .TP
25
33
  \fB\-\-quiet\fR
26
34
  Only output warnings and errors\.
27
35
  .TP
28
36
  \fB\-\-gemfile=GEMFILE\fR
29
37
  The location of the Gemfile(5) which Bundler should use\. This defaults to a Gemfile(5) in the current working directory\. In general, Bundler will assume that the location of the Gemfile(5) is also the project's root and will try to find \fBGemfile\.lock\fR and \fBvendor/cache\fR relative to this location\.
38
+ .TP
39
+ \fB\-\-ssl\fR
40
+ Diagnose common SSL problems when connecting to https://rubygems\.org\.
41
+ .IP
42
+ This flag runs the \fBbundle doctor ssl\fR subcommand with default values underneath\.
43
+ .SS "ssl"
44
+ If you've experienced issues related to SSL certificates and/or TLS versions while connecting to https://rubygems\.org, this command can help troubleshoot common problems\. The diagnostic will perform a few checks such as:
45
+ .IP "\(bu" 4
46
+ Verify the Ruby OpenSSL version installed on your system\.
47
+ .IP "\(bu" 4
48
+ Check the OpenSSL library version used for compilation\.
49
+ .IP "\(bu" 4
50
+ Ensure CA certificates are correctly setup on your machine\.
51
+ .IP "\(bu" 4
52
+ Open a TLS connection and verify the outcome\.
53
+ .IP "" 0
54
+ .P
55
+ \fBOPTIONS\fR
56
+ .TP
57
+ \fB\-\-host=HOST\fR
58
+ Perform the diagnostic on HOST\. Defaults to \fBrubygems\.org\fR\.
59
+ .TP
60
+ \fB\-\-tls\-version=TLS\-VERSION\fR
61
+ Specify the TLS version when opening the connection to HOST\.
62
+ .IP
63
+ Accepted values are: \fB1\.1\fR or \fB1\.2\fR\.
64
+ .TP
65
+ \fB\-\-verify\-mode=VERIFY\-MODE\fR
66
+ Specify the TLS verify mode when opening the connection to HOST\. Defaults to \fBSSL_VERIFY_PEER\fR\.
67
+ .IP
68
+ Accepted values are: \fBCLIENT_ONCE\fR, \fBFAIL_IF_NO_PEER_CERT\fR, \fBNONE\fR, \fBPEER\fR\.
30
69
 
@@ -3,16 +3,27 @@ bundle-doctor(1) -- Checks the bundle for common problems
3
3
 
4
4
  ## SYNOPSIS
5
5
 
6
- `bundle doctor` [--quiet]
7
- [--gemfile=GEMFILE]
6
+ `bundle doctor [diagnose]` [--quiet]
7
+ [--gemfile=GEMFILE]
8
+ [--ssl]<br>
9
+ `bundle doctor ssl` [--host=HOST]
10
+ [--tls-version=TLS-VERSION]
11
+ [--verify-mode=VERIFY-MODE]<br>
12
+ `bundle doctor` help [COMMAND]
8
13
 
9
14
  ## DESCRIPTION
10
15
 
16
+ You can diagnose common Bundler problems with this command such as checking gem environment or SSL/TLS issue.
17
+
18
+ ## SUB-COMMANDS
19
+
20
+ ### diagnose (default command)
21
+
11
22
  Checks your Gemfile and gem environment for common problems. If issues
12
23
  are detected, Bundler prints them and exits status 1. Otherwise,
13
24
  Bundler prints a success message and exits status 0.
14
25
 
15
- Examples of common problems caught by bundle-doctor include:
26
+ Examples of common problems caught include:
16
27
 
17
28
  * Invalid Bundler settings
18
29
  * Mismatched Ruby versions
@@ -20,7 +31,7 @@ Examples of common problems caught by bundle-doctor include:
20
31
  * Uninstalled gems
21
32
  * Missing dependencies
22
33
 
23
- ## OPTIONS
34
+ **OPTIONS**
24
35
 
25
36
  * `--quiet`:
26
37
  Only output warnings and errors.
@@ -31,3 +42,36 @@ Examples of common problems caught by bundle-doctor include:
31
42
  will assume that the location of the Gemfile(5) is also the project's
32
43
  root and will try to find `Gemfile.lock` and `vendor/cache` relative
33
44
  to this location.
45
+
46
+ * `--ssl`:
47
+ Diagnose common SSL problems when connecting to https://rubygems.org.
48
+
49
+ This flag runs the `bundle doctor ssl` subcommand with default values
50
+ underneath.
51
+
52
+ ### ssl
53
+
54
+ If you've experienced issues related to SSL certificates and/or TLS versions while connecting
55
+ to https://rubygems.org, this command can help troubleshoot common problems.
56
+ The diagnostic will perform a few checks such as:
57
+
58
+ * Verify the Ruby OpenSSL version installed on your system.
59
+ * Check the OpenSSL library version used for compilation.
60
+ * Ensure CA certificates are correctly setup on your machine.
61
+ * Open a TLS connection and verify the outcome.
62
+
63
+ **OPTIONS**
64
+
65
+ * `--host=HOST`:
66
+ Perform the diagnostic on HOST. Defaults to `rubygems.org`.
67
+
68
+ * `--tls-version=TLS-VERSION`:
69
+ Specify the TLS version when opening the connection to HOST.
70
+
71
+ Accepted values are: `1.1` or `1.2`.
72
+
73
+ * `--verify-mode=VERIFY-MODE`:
74
+ Specify the TLS verify mode when opening the connection to HOST.
75
+ Defaults to `SSL_VERIFY_PEER`.
76
+
77
+ Accepted values are: `CLIENT_ONCE`, `FAIL_IF_NO_PEER_CERT`, `NONE`, `PEER`.
@@ -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\-ENV" "1" "March 2025" ""
3
+ .TH "BUNDLE\-ENV" "1" "March 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-env\fR \- Print information about the environment Bundler is running under
6
6
  .SH "SYNOPSIS"
@@ -1,10 +1,10 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-EXEC" "1" "March 2025" ""
3
+ .TH "BUNDLE\-EXEC" "1" "March 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-exec\fR \- Execute a command in the context of the bundle
6
6
  .SH "SYNOPSIS"
7
- \fBbundle exec\fR [\-\-keep\-file\-descriptors] [\-\-gemfile=GEMFILE] \fIcommand\fR
7
+ \fBbundle exec\fR [\-\-gemfile=GEMFILE] \fIcommand\fR
8
8
  .SH "DESCRIPTION"
9
9
  This command executes the command, making all gems specified in the [\fBGemfile(5)\fR][Gemfile(5)] available to \fBrequire\fR in Ruby programs\.
10
10
  .P
@@ -13,9 +13,6 @@ Essentially, if you would normally have run something like \fBrspec spec/my_spec
13
13
  Note that \fBbundle exec\fR does not require that an executable is available on your shell's \fB$PATH\fR\.
14
14
  .SH "OPTIONS"
15
15
  .TP
16
- \fB\-\-keep\-file\-descriptors\fR
17
- Passes all file descriptors to the new processes\. Default is true from bundler version 2\.2\.26\. Setting it to false is now deprecated\.
18
- .TP
19
16
  \fB\-\-gemfile=GEMFILE\fR
20
17
  Use the specified gemfile instead of [\fBGemfile(5)\fR][Gemfile(5)]\.
21
18
  .SH "BUNDLE INSTALL \-\-BINSTUBS"
@@ -3,7 +3,7 @@ bundle-exec(1) -- Execute a command in the context of the bundle
3
3
 
4
4
  ## SYNOPSIS
5
5
 
6
- `bundle exec` [--keep-file-descriptors] [--gemfile=GEMFILE] <command>
6
+ `bundle exec` [--gemfile=GEMFILE] <command>
7
7
 
8
8
  ## DESCRIPTION
9
9
 
@@ -20,10 +20,6 @@ available on your shell's `$PATH`.
20
20
 
21
21
  ## OPTIONS
22
22
 
23
- * `--keep-file-descriptors`:
24
- Passes all file descriptors to the new processes. Default is true from
25
- bundler version 2.2.26. Setting it to false is now deprecated.
26
-
27
23
  * `--gemfile=GEMFILE`:
28
24
  Use the specified gemfile instead of [`Gemfile(5)`][Gemfile(5)].
29
25
 
@@ -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\-FUND" "1" "March 2025" ""
3
+ .TH "BUNDLE\-FUND" "1" "March 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-fund\fR \- Lists information about gems seeking funding assistance
6
6
  .SH "SYNOPSIS"