I’m trying to use bundix on a rails projects that uses multiple engines. I’ve ran bundix to generate a gemset.nix
and shell.nix
. So far building works fine but when calling bundler (or any other commands installed by the derivation created by bundix) it complains that it can’t find the engines with the following error:
/nix/store/3h9n2k5gfm84gk74s77vb23d274c7g83-bundler-2.2.20/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/source/path.rb:209:in
load_spec_files': The path
/nix/store/r2ndb03whz82fj6nbsgm1ks6n2z09y27-gemfile-and-lockfile/engines/engine-name` does not exist. (Bundler::PathError)
Indeed the /nix/store/r2ndb03whz82fj6nbsgm1ks6n2z09y27-gemfile-and-lockfile/Gemfile
file contains the following:
gem ‘engine-name’, path: ‘engines/engine-name’
I can see that this gem is in the nix store but it’s searching for it relative to the Gemfile
and there is nothing else in the gemfile-and-lockfile
directory except the Gemfile
and Gemfile.lock
. What can I do to fix this? Should I somehow create links from the gemfile-and-lockfile
directory to the gem’s directory in the nix store? Or should I find a way to patch the Gemfile to se the full path? Or did I miss something way simpler?
It seems it should have been fixed in bundix 2.4 but I’m using 2.5 and I can’t get it to work.
https://github.com/nix-community/bundix/issues/17