You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing this gem and using it to install esbuild, the build stage of the Dockerfile doesn't have the tools needed to precompile assets. Here's the error I got:
[build 6/6] RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
1.342 bin/rails aborted!
1.342 jsbundling-rails: Command install failed, ensure yarn is installed
1.370
1.370 Tasks: TOP => assets:precompile => javascript:build => javascript:install
1.370 (See full trace by running task with --trace)
ERROR: process "/bin/sh -c SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile" did not complete successfully: exit code: 1
I was able to resolve this issue by adding the following to the build stage of the Kamal-generated Dockerfile after the apt-get install build-essential step.
RUN curl -fsSL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh && \
bash nodesource_setup.sh
RUN apt-get install -y nodejs
RUN npm install --global yarn
I don't know if this is something that is generalizable, or if it is needed for all of the various bundlers. But, I suspect that other folks will run into this error and might not have the Docker knowledge needed to fix it.
The text was updated successfully, but these errors were encountered:
After installing this gem and using it to install
esbuild
, thebuild
stage of the Dockerfile doesn't have the tools needed to precompile assets. Here's the error I got:I was able to resolve this issue by adding the following to the
build
stage of the Kamal-generatedDockerfile
after theapt-get install build-essential
step.I don't know if this is something that is generalizable, or if it is needed for all of the various bundlers. But, I suspect that other folks will run into this error and might not have the Docker knowledge needed to fix it.
The text was updated successfully, but these errors were encountered: