nixpacks icon indicating copy to clipboard operation
nixpacks copied to clipboard

Rails app with taglib/taglib-ruby won't build

Open fusion2004 opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the bug

When attempting to build a rails app with taglib installed via nixPkgs and taglib-ruby as a Gemfile dependency, it can't find taglib and bundle install fails.

If I install taglib with libtag1-dev via aptPkgs, it works. (But ubuntu updates taglib way less often than nixpkgs... so I'd prefer to use that.)

Additionally, I can get it to work with in a micro-example, so I'm not sure if it is something wrong with how nixpacks is currently using nix:

With this Gemfile:

source 'https://rubygems.org'

gem "taglib-ruby"

Running bundle install within different nix-shells works as follows:

  • nix-shell -p ruby: fails with the same error, unable to find taglib
  • nix-shell -p ruby taglib: works!

To reproduce

I also have a small reproduction app with a fresh rails install: https://github.com/fusion2004/nixpacks-rails-taglib-issue

Expected behavior

No response

Environment

For my actual app I'm working with, as well as the small rails reproduction app above, I'm working in WSL2 Ubuntu 22.04 LTS w/ nixpacks installed via homebrew/linuxbrew.

For the nix-shell tests I was running a docker image of NixOS:

docker run --rm -ti nixos/nix

fusion2004 avatar Jan 10 '23 17:01 fusion2004

I hadn't noticed the nixLibs config option in the docs, so I just tried adding that and it doesn't seem to change anything. I pushed that to the reproduction app as well.

fusion2004 avatar Jan 10 '23 20:01 fusion2004