-
Notifications
You must be signed in to change notification settings - Fork 183
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
bootsnap/setup cannot load msgpack #488
Comments
Alrigth, I tracked it down to When calling Then But this hack wasn't tested in bundler-less environment, so it never expected the call to I can fix it by explicitly activating the gems passed to |
Fix: #488 `ExplicitRequire.with_gems` assumed the provided gems were activated which is only true if `bundler/setup` was required. If bootsnap is used without bundler, then we need to explictly activate the gem before mutating the `$LOAD_PATH`, otherwise the paths appended during gems activation will be lost once we exit `with_gems`.
Fix: #488 `ExplicitRequire.with_gems` assumed the provided gems were activated which is only true if `bundler/setup` was required. If bootsnap is used without bundler, then we need to explictly activate the gem before mutating the `$LOAD_PATH`, otherwise the paths appended during gems activation will be lost once we exit `with_gems`.
❤️ |
Disclaimer
I discovered this messing around, but do not personally need it fixed in practice.
Reporting just in case it is of the interest of the project.
I made sure the issue is in bootsnap
I did not investigate if the issue is in Bootsnap itself or perhaps in RubyGems.
Steps to reproduce
Minimal example, does not need a Gemfile, can be reproduced in an empty directory:
Expected behavior
We get a prompt back.
Actual behavior
While the gem
msgpack
is installed:Bootsnap initialization is not able to load it:
System configuration
Bootsnap version:
1.18.3
Ruby version:
3.3.0
RubyGems version:
3.5.15
The text was updated successfully, but these errors were encountered: