b359ea34e7 (master): [ruby/rubygems] Skip checksum for the bundler gem if no `bundler.gem` exists on disk:

0 views
Skip to first unread message

Edouard CHIN

unread,
9:04 AM (10 hours ago) 9:04 AM
to ruby...@g.ruby-lang.org
Edouard CHIN 2026-03-26 12:48:51 +0000 (Thu, 26 Mar 2026)

New Revision: b359ea34e7

https://github.com/ruby/ruby/commit/b359ea34e7

Log:
[ruby/rubygems] Skip checksum for the bundler gem if no `bundler.gem` exists on disk:

- ### Problem

This change is purely to fix a problem when developing Bundler.
When we tried to release Bundler 4.0.9, we bumped the VERSION
from `4.1.0.dev` to `4.0.9`, this condition now evaluates to false
https://github.com/ruby/rubygems/blob/34d19fa8a3f84c50e2ba65e0f39c80045e7cbfb8/bundler/lib/bundler/lockfile_generator.rb#L106.
We then ended up with a CI crash.

```
Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/runner/work/rubygems/rubygems/cache/bundler-4.0.9.gem
```

### Context

Computing a checksum for the `bundler` gem is only possible
when the `bundler.gem` binary exists on disk. When a regular
user interacts with `bundler`, the spec is loaded from disk and
an associated cached `bundler.gem` should exists.

However, when developing Bundler, the spec doesn't come from disk
but from a fake spec https://github.com/ruby/rubygems/blob/34d19fa8a3f84c50e2ba65e0f39c80045e7cbfb8/bundler/lib/bundler/source/metadata.rb#L22-L28
that with no associated `bundler.gem`.

### Solution

To prevent CI from breaking whenever we make a release, we have
to skip computing a checksum if no `bundler.gem` exists.

https://github.com/ruby/rubygems/commit/01e0e61612

Modified files:
lib/bundler/lockfile_generator.rb
Reply all
Reply to author
Forward
0 new messages