Title says it all. I have an app that's been using esbuild to this point without issues, and I can successfully run bun in development with no problems.
I've logged in to my Ubuntu 20.04 server as the deploy user and installed bun with:
curl -fsSL https://bun.sh/install | bash
I can then run bun successfully:
$ bun -v
# => 1.0.13
But the capistrano deploy fails with:
cssbundling-rails: Command install failed, ensure bun is installed
What am I missing here?
The issue here is that the bun installer adds lines to the user's
.bashrcthat puts the bun bin (type that three times fast...) on the user's path. But the majority of the.bashrcdoesn't run in the non-interactive capistrano login.The solution is to add this in the
config/deploy.rb: