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: _posts/2025-12-26-whats-new-rubygems-bundler4.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Since [my previous post focused on migration and compatibility concerns](https:/
11
11
12
12
## Parallelization of C-extension Gem Builds
13
13
14
-
https://github.com/ruby/rubygems/pull/9131
14
+
[Add `MAKEFLAGS=-j` by default before compiling](https://github.com/ruby/rubygems/pull/9131)
15
15
16
16
When installing gems with C extensions (such as `mysql2` or `pg`), RubyGems now automatically adds `MAKEFLAGS=-j` to the make command for parallel execution. Users previously had to manually configure this themselves. By leveraging multi-core CPUs by default, installation times are significantly reduced.
17
17
@@ -21,7 +21,7 @@ While convenient for local development, we discovered after implementation that
21
21
22
22
## Unified Parallel Job Execution Options
23
23
24
-
https://github.com/ruby/rubygems/pull/9171
24
+
[Pass down value of `BUNDLE_JOBS` to RubyGems before compiling & introduce a new `gem install -j` flag](https://github.com/ruby/rubygems/pull/9171)
25
25
26
26
To prevent resource exhaustion in virtual environments, a new `-j` flag for `gem install` and automatic passing of `BUNDLE_JOBS` to RubyGems have been introduced.
27
27
@@ -31,23 +31,23 @@ However, even with these changes, worst-case scenarios remain (where `BUNDLE_JOB
31
31
32
32
While the specifics are still in development, this should eliminate worst-case scenarios. We've also learned that Go's `GOMAXPROCS` handles containerized environments like CircleCI by reading CPU info from cgroup:
33
33
34
-
https://bugs.ruby-lang.org/issues/21797
34
+
[Feature #21797: Improve Etc.nprocessors for cgroup environment](https://bugs.ruby-lang.org/issues/21797)
35
35
36
36
By incorporating this approach into Ruby core and combining it with a jobserver, we expect to achieve optimal build speeds while fully utilizing available CPUs. Stay tuned!
37
37
38
38
## Increased Connection Pool and Efficient Network Communication
39
39
40
-
https://github.com/ruby/rubygems/pull/9087
40
+
[Increase connection pool to allow for up to 70% speed increase on `bundle install`](https://github.com/ruby/rubygems/pull/9087)
41
41
42
42
The default connection pool for Bundler and RubyGems network requests has been expanded to 5 parallel connections. This improvement reportedly reduces `bundle install` times by up to 70%.
43
43
44
-
https://github.com/ruby/rubygems/pull/9071
44
+
[Adjust the API_REQUEST_LIMIT to make less network roundtrip](https://github.com/ruby/rubygems/pull/9071)
45
45
46
46
Additionally, `API_REQUEST_LIMIT` (which controls batch sizes of dependency information) has increased from 50 to 100, doubling the gems per request. For example, a Gemfile with 400 dependencies now requires just 4 network requests instead of 8.
47
47
48
48
## Pattern Matching Support for Gem::NameTuple and Gem::Platform
49
49
50
-
https://github.com/ruby/rubygems/pull/9062
50
+
[Add pattern matching support to Gem::Platform](https://github.com/ruby/rubygems/pull/9062)
51
51
52
52
When writing scripts that need to inspect gem names, versions, or platforms, you can now use Ruby's pattern matching for cleaner and safer logic.
53
53
@@ -66,13 +66,13 @@ end
66
66
67
67
Pattern matching support for `Gem::Version` is still under consideration and may not move forward.
68
68
69
-
https://github.com/ruby/rubygems/pull/9060
69
+
[Add pattern matching support to Gem::Version](https://github.com/ruby/rubygems/pull/9060)
70
70
71
71
The proposal suggested decomposing versions into `major`, `minor`, and `build` components, but real-world versions include strings like `4.0.0.beta3` or `4.0.0.beta.3`. It would be inconsistent for these to equal `4.0.0`, and equally confusing for `beta3` and `beta.3` to be treated as equivalent. Additionally, since `build` is sometimes called `tiny` or `patch` and lacks a clear definition, I'm hesitant about introducing this feature.
72
72
73
73
## JSON Output for bundle list
74
74
75
-
https://github.com/ruby/rubygems/pull/8728
75
+
[Introduce `bundle list --format=json`](https://github.com/ruby/rubygems/pull/8728)
76
76
77
77
A new `--format=json` option for `bundle list` makes it easy to integrate Bundler with external tools.
[Add support for lockfile in Gemfile and bundle install --no-lock](https://github.com/ruby/rubygems/pull/9059)
89
89
90
90
The `bundle install --no-lock` flag now skips lockfile generation, which is convenient when you want to test dependency resolution without creating or modifying lockfile artifacts.
You can now specify a custom lockfile name using `bundle install --gemfile=foo --lockfile=bar`. This defaults to the `.lock` extension if not specified, but is useful when working with variants like `Gemfile.next` or `Gemfile.rails81`.
97
97
98
98
## Creating Go-extension Gems
99
99
100
-
https://github.com/ruby/rubygems/pull/8183
100
+
[Add `--ext=go` to `bundle gem`](https://github.com/ruby/rubygems/pull/8183)
101
101
102
102
RubyGems' gem scaffolding and build tools previously supported C and Rust extensions. Support for Go has now been added. You can create a Go-extension gem template with `bundle gem --ext=go foo`.
103
103
104
104
## Using did_you_mean for Bundler Typo Checks
105
105
106
-
https://github.com/ruby/rubygems/pull/3857
106
+
[Use DidYouMean::SpellChecker for gem suggestions in Bundler](https://github.com/ruby/rubygems/pull/3857)
107
107
108
108
Bundler's typo detection and command suggestions previously used a custom implementation. This has now been updated to use `did_you_mean`, keeping it consistent with other Ruby tools.
0 commit comments