Open shuhaowu opened 4 years ago
FWIW, we work around this by requiring nix_store_safeguard.rb with RUBYOPT
, but the solution is... suboptimal. I wonder if there's some alternative strategy that doesn't involve symlinking code (but also doesn't wastefully copy it all).
Hello, I'm a bot and I thank you in the name of the community for opening this issue.
To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.
The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.
If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.
Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.
If this is the issue I think it is, it can also be solved by copying all gemfiles instead of symlinking them. Which is also suboptimal but better than monkeypatching. With bundlerEnv
you can do this by passing copyGemFiles = true
. Unfortunately if you use bundlerApp
there's no current parameter for this.
Can confirm the above solves the issue. I observed another case today where if i require "minitest"
twice, the second time will double include and cause some exceptions.
Describe the bug Creating a
bundlerEnv
with the gemkubeclient
and attempting torequire "kubeclient"
causes aNameError
to be raised uponrequire
.To Reproduce Steps to reproduce the behavior:
nix-shell
with the above environment.irb
, and in it, runrequire 'kubeclient'
Immediately, you will see:
Expected behavior Expect the ruby module to be imported correctly.
Additional context The warnings complaining about already initialized constants suggests that certain files are being required twice.
Metadata
Maintainer information: