Skip to content

Bundix doesn't work with the ruby option in the Gemfile if bundix is built with a different ruby version #81

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

Open
edude03 opened this issue Mar 26, 2021 · 1 comment

Comments

@edude03
Copy link

edude03 commented Mar 26, 2021

So I've been having a weird issue were I couldn't use bundix inside of nix shell using a bundlerEnv.

I'd get an error like couldn't find gem ruby 2.7.2 found 2.6.6 (going from memory, sorry).

Anyway, while debugging a different issue with bundix (why I had both ruby 2.6 and 2.7 in my closure) I found out the bundix derivation has a ruby option. Passing ruby = pkgs.ruby_2_7 into bundix makes this issue go away, which makes me assume bundix is using it's own version of ruby when bundling thus why it can't find the version of ruby the app is using.

I'm not sure if there is a better fix other than passing bundix the same version of ruby as your bundlerEnv, but I figured I'd open an issue to hopefully spark discussion or at least help people running into the same issue

@vmsp
Copy link

vmsp commented Jul 19, 2021

For anyone, like myself, who stumbles on this issue, you can do this:

nix-shell -p "ruby_3_0" -p "bundix" --run "bundle lock && bundix --ruby=ruby_3_0"

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

No branches or pull requests

2 participants