Closed Petercopter closed 1 month ago
After creating an empty .gitattributes
in the project root dir, the bun install command works and outputs:
Run 'git config diff.lockb.textconv bun && git config diff.lockb.binary true' to enable pretty diffs for Bun's .lockb file
Why is it assumed git is in use? I my case it is not, and git
is not installed!
Feel free to open a PR fixing this.
Actually the problem lies elsewhere. When the gem is built, the .gitattributes
file is not properly bundled with it which is what the error is implying.
PR with a fix here: https://github.com/rails/jsbundling-rails/pull/193
I was trying to replace esbuild with bun by running the installer:
but I got this error:
So I tested in a different project, and that one worked because it had a
.gitattributes
file in the root.It looks like adding a
.gitattributes
file is a new-ish thing in Rails, that's why the first project didn't have one, it's about 3 years old. https://github.com/platformsh-templates/rails/commits/master/.gitattributesSo it seems like the jsbundling-rails installer just needs to check and see if that file already exists or not.