-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rakefile is failing to load without requiring shared helpers. #7638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'm not sure what changed, but multiple people are having this issue and this fixes it.
|
A recent CI run in ruby openssl had a possibly similar issue (NameError: uninitialized constant Bundler::SharedHelpers). See https://github.com/ruby/openssl/actions/runs/8999647687, the three failing Windows jobs, which all installed Bundler 2.5.10. |
|
This seems to be locally problem only on Ruby 3.2. Is that possible? 🤔 |
|
I was using 3.3.1. |
|
@martinemde Can you share more details? I could use I tried with fresh repository with |
|
By looking at logs posted by @MSP-Greg, it seems like the more natural place to add this require is right before https://github.com/rubygems/rubygems/blob/936827c1171a23773d0643e8fcb207bf67ec8397/bundler/lib/bundler/rubygems_ext.rb#L151. It also explains why we never got this problem reported before, since that code was just introduced in Bundler 2.5.10. |
|
Thanks, I got it. Should we require |
|
Thanks for looking at this. Not sure how many have looked at how the error occurred. I'm not sure how @martinemde noticed the issue, as the OpenSSL logs only occurred with a Bundler upgrade. I apologize for not digging into the code to find the cause, but it does seem to only occur when Bundler 2.5.10 is used with a 'previously released' RubyGems. Lastly, since RubyGems & Bundler are in the same repo, and testing new Bundler releases against previous RubyGems releases must be quite a PITA, maybe consideration should be given to no longer releasing Bundler gems? Or, if one wants to update Bundler, one must do so with a RubyGems update... |
|
I just pulled and then ran rake. We were helping people get set up to hack on rubygems at RailsConf and multiple people on OSX with fresh copies of the repo had this happen. My copy was not fresh but this error started happening recently. Probably it's slightly older rubygems on my laptop with Bundler edge. I pushed this up to unblock people quickly so they could build off this branch. I'm not certain it's the right fix. Edit: the idea of completely merging bundler into rubygems makes sense in principle and seems like a lot of work. The primary obstacle I see is locked bundler version auto-install. |
|
I think the better fix is to require I was expecting By the way, sorry for the bad timing of this regression! I wish we had found it before Rails Conf! |
|
I figured it out. It's unrelated to the version of RubyGems and/or Ruby. It can be reproduced regardless of those by having two different versions of |
|
I'll open a separate PR for this 👍. |
|
I added what I think it's a better fix at #7647. |
What was the end-user or developer problem that led to this PR?
Somehow, a fresh copy of rubygems is failing when running rake.
What is your fix for the problem, implemented in this PR?
Require bundler shared helpers high enough up that it fixes the issue. If someone else can figure out a better way, I'm open to that. This patch at least solves the issue for now.
Make sure the following tasks are checked