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
I saw there was a similar issue in the past regarding this error when precompiling assets. It was suggested that it was a Ruby issue and recommended to wait until Ruby 3.3.1 is released.
In my case, this issue is still happening with the following setup:
Ruby 3.3.1
Kamal 1.7.0
Rails 7.1.3
When running kamal deploy -d staging, I eventually get the following error:
------
kamal-backoffice-service.dockerfile:45
--------------------
43 | # SECRET_KEY_BASE_DUMMY=1 RAILS_MASTER_KEY=$RAILS_MASTER_KEY ./bin/rails assets:precompile
44 |
45 | >>> RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
46 |
47 | # Final stage for app image
--------------------
ERROR: failed to solve: process "/bin/sh -c SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile" did not complete successfully: exit code: 1
When I run the docker-compose, the whole process works, but running kamal deploy fails. I've also tried to pass the RAILS_MASTER_KEY as an argument into the build process, but it keeps failing:
# Set up a secret mount and precompile assets
RUN --mount=type=secret,id=RAILS_MASTER_KEY \
RAILS_MASTER_KEY=$(cat /run/secrets/RAILS_MASTER_KEY) && \
SECRET_KEY_BASE_DUMMY=1 RAILS_MASTER_KEY=$RAILS_MASTER_KEY ./bin/rails assets:precompile
Is anyone else facing the same situation?
The text was updated successfully, but these errors were encountered:
I was attempting to access credentials like so Rails.application.credentials.gmail.username, whereas I should've been accessing it as Rails.application.credentials.dig(:gmail, :username). Making this change solved the issue for me.
buncis
added a commit
to buncis/rails
that referenced
this issue
Oct 8, 2024
Hi,
I saw there was a similar issue in the past regarding this error when precompiling assets. It was suggested that it was a Ruby issue and recommended to wait until Ruby 3.3.1 is released.
In my case, this issue is still happening with the following setup:
When running kamal deploy -d staging, I eventually get the following error:
When I run the docker-compose, the whole process works, but running kamal deploy fails. I've also tried to pass the RAILS_MASTER_KEY as an argument into the build process, but it keeps failing:
Is anyone else facing the same situation?
The text was updated successfully, but these errors were encountered: