Skip to content

fix: load bundler/setup before attestation patch to prevent default gem conflict#34

Open
thekuwayama wants to merge 2 commits into
rubygems:v1from
thekuwayama:fix__bundler_setup
Open

fix: load bundler/setup before attestation patch to prevent default gem conflict#34
thekuwayama wants to merge 2 commits into
rubygems:v1from
thekuwayama:fix__bundler_setup

Conversation

@thekuwayama
Copy link
Copy Markdown

@thekuwayama thekuwayama commented May 5, 2026

Overview

Hi!

resolve: #28

This PR modifies that Bundler activates gems with Gemfile at first. If a default gem is listed as a dependency in your Gemfile, activation conflicts will no longer occur.

Problem

RUBYOPT loads rubygems-attestation-patch.rb before Bundler has activated the gems specified in the Gemfile. The file contains require "rubygems/commands/push_command" which activates the default openssl of ruby-version.

And Bundler tries to activate the openssl version specified in the Gemfile, a conflict occurs.

You have already activated openssl 4.0.0, but your Gemfile requires openssl 3.3.2. Since openssl is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports openssl as a default gem. (Gem::LoadError)

Solution

I prepend -rbundler/setup to RUBYOPT.

Bundler activates the gems specified in the Gemfile, including openssl, before rubygems-attestation-patch.rb is loaded, resolving the version conflict.

@thekuwayama
Copy link
Copy Markdown
Author

thekuwayama commented May 5, 2026

thekuwayama and others added 2 commits May 8, 2026 19:41
…ndler/setup

-rbundler/setup activates all gems in the Gemfile, but requires them to be
installed locally first. Without bundle install, Bundler::GemNotFound is raised.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@thekuwayama thekuwayama force-pushed the fix__bundler_setup branch from 1a84d77 to 32a4d8c Compare May 8, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conflict with Gemfile openssl

1 participant