-
Hello everyone, I am trying to setup a deployment of a Rails application with Kamal, it mostly works fine but the If anyone that has come across this could help me out it would be very much appreciated. Expand kamal setup outputkamal setup
INFO [73c4c720] Running /usr/bin/env mkdir -p .kamal on 111.111.111.11
root@111.111.111.11's password:
INFO [73c4c720] Finished in 5.547 seconds with exit status 0 (successful).
INFO [f5bbc784] Running /usr/bin/env mkdir -p .kamal/locks on 111.111.111.11
INFO [f5bbc784] Finished in 0.057 seconds with exit status 0 (successful).
Acquiring the deploy lock...
Ensure Docker is installed...
INFO [13e8be49] Running docker -v on 111.111.111.11
INFO [13e8be49] Finished in 0.076 seconds with exit status 0 (successful).
INFO [04c0f08d] Running /usr/bin/env mkdir -p .kamal on 111.111.111.11
INFO [04c0f08d] Finished in 0.054 seconds with exit status 0 (successful).
Evaluate and push env files...
Skipping envify (no .env.erb exist)
INFO [77a62dff] Running /usr/bin/env mkdir -p .kamal/env/roles on 111.111.111.11
INFO [77a62dff] Finished in 0.052 seconds with exit status 0 (successful).
INFO Uploading .kamal/env/roles/rails_app_name-web.env 100.0%
INFO [0f761752] Running /usr/bin/env mkdir -p .kamal/env/traefik on 111.111.111.11
INFO [0f761752] Finished in 0.057 seconds with exit status 0 (successful).
INFO Uploading .kamal/env/traefik/traefik.env 100.0%
Log into image registry...
INFO [f1e7b827] Running docker login registry.digitalocean.com -u [REDACTED] -p [REDACTED] on localhost
INFO [f1e7b827] Finished in 0.550 seconds with exit status 0 (successful).
INFO [ffdd54d9] Running docker login registry.digitalocean.com -u [REDACTED] -p [REDACTED] on 111.111.111.11
INFO [ffdd54d9] Finished in 0.472 seconds with exit status 0 (successful).
Build and push app image...
INFO [af026cc6] Running docker --version && docker buildx version on localhost
INFO [af026cc6] Finished in 0.065 seconds with exit status 0 (successful).
Building from a local git clone, so ignoring these uncommitted changes:
M .ruby-version
M Dockerfile
M Gemfile
M Gemfile.lock
M config/deploy.yml
M db/schema.rb
?? app/.DS_Store
?? app/assets/.DS_Store
?? letsencrypt/
INFO Cloning repo into build directory `/tmp/kamal-clones/rails_app_name-2f65914456263/workdir/`...
INFO [a420ed33] Running /usr/bin/env git -C /tmp/kamal-clones/rails_app_name-2f65914456263 clone /workdir on localhost
INFO [a420ed33] Finished in 0.370 seconds with exit status 0 (successful).
INFO [a6ffd782] Running /usr/bin/env git -C /tmp/kamal-clones/rails_app_name-2f65914456263/workdir/ status --porcelain on localhost
INFO [a6ffd782] Finished in 0.012 seconds with exit status 0 (successful).
INFO [6f9c01d3] Running /usr/bin/env git -C /tmp/kamal-clones/rails_app_name-2f65914456263/workdir/ rev-parse HEAD on localhost
INFO [6f9c01d3] Finished in 0.001 seconds with exit status 0 (successful).
INFO [8578b386] Running docker buildx inspect kamal-rails_app_name-multiarch > /dev/null on localhost
WARN Missing compatible builder, so creating a new one first
INFO [fa6cc888] Running docker buildx create --use --name kamal-rails_app_name-multiarch on localhost
INFO [fa6cc888] Finished in 0.093 seconds with exit status 0 (successful).
INFO [cc0446bb] Running docker buildx build --push --platform linux/amd64,linux/arm64 --builder kamal-rails_app_name-multiarch -t registry.digitalocean.com/container_registry/rails_app_name:4c767003b2b1376c403934f7e1542440148816cc -t registry.digitalocean.com/container_registry/rails_app_name:latest --label service="rails_app_name" --file Dockerfile . on localhost
DEBUG [cc0446bb] Command: docker buildx build --push --platform linux/amd64,linux/arm64 --builder kamal-rails_app_name-multiarch -t registry.digitalocean.com/container_registry/rails_app_name:4c767003b2b1376c403934f7e1542440148816cc -t registry.digitalocean.com/container_registry/rails_app_name:latest --label service="rails_app_name" --file Dockerfile .
DEBUG [cc0446bb] #0 building with "kamal-rails_app_name-multiarch" instance using docker-container driver
DEBUG [cc0446bb]
DEBUG [cc0446bb] #1 [internal] load build definition from Dockerfile
DEBUG [cc0446bb] #1 transferring dockerfile: 2.44kB done
DEBUG [cc0446bb] #1 DONE 0.0s
DEBUG [cc0446bb]
DEBUG [cc0446bb] #2 resolve image config for docker-image://docker.io/docker/dockerfile:1
DEBUG [cc0446bb] #2 DONE 0.8s
DEBUG [cc0446bb]
DEBUG [cc0446bb] #3 docker-image://docker.io/docker/dockerfile:1@sha256:fe40cf4e92cd0c467be2cfc30657a680ae2398318afd50b0c80585784c604f28
DEBUG [cc0446bb] #3 resolve docker.io/docker/dockerfile:1@sha256:fe40cf4e92cd0c467be2cfc30657a680ae2398318afd50b0c80585784c604f28 done
DEBUG [cc0446bb] #3 CACHED
DEBUG [cc0446bb]
DEBUG [cc0446bb] #4 [linux/amd64 internal] load metadata for registry.docker.com/library/ruby:3.1.0-slim
DEBUG [cc0446bb] #4 DONE 0.8s
DEBUG [cc0446bb]
DEBUG [cc0446bb] #5 [linux/arm64 internal] load metadata for registry.docker.com/library/ruby:3.1.0-slim
DEBUG [cc0446bb] #5 DONE 0.8s
DEBUG [cc0446bb]
DEBUG [cc0446bb] #6 [internal] load .dockerignore
DEBUG [cc0446bb] #6 transferring context: 745B done
DEBUG [cc0446bb] #6 DONE 0.0s
DEBUG [cc0446bb]
DEBUG [cc0446bb] #7 [linux/arm64 base 1/2] FROM registry.docker.com/library/ruby:3.1.0-slim@sha256:d2ec60a604ba35e726ba8721c9344a83888b0d11f2b4f2d56a117e53eac6295a
DEBUG [cc0446bb] #7 resolve registry.docker.com/library/ruby:3.1.0-slim@sha256:d2ec60a604ba35e726ba8721c9344a83888b0d11f2b4f2d56a117e53eac6295a done
DEBUG [cc0446bb] #7 DONE 0.0s
DEBUG [cc0446bb]
DEBUG [cc0446bb] #8 [linux/arm64 base 2/2] WORKDIR /rails
DEBUG [cc0446bb] #8 CACHED
DEBUG [cc0446bb]
DEBUG [cc0446bb] #9 [linux/arm64 stage-2 1/4] RUN apt-get update -qq && apt-get install --no-install-recommends -y curl libvips postgresql-client && rm -rf /var/lib/apt/lists /var/cache/apt/archives
DEBUG [cc0446bb] #9 CACHED
DEBUG [cc0446bb]
DEBUG [cc0446bb] #10 [linux/amd64 base 1/2] FROM registry.docker.com/library/ruby:3.1.0-slim@sha256:d2ec60a604ba35e726ba8721c9344a83888b0d11f2b4f2d56a117e53eac6295a
DEBUG [cc0446bb] #10 resolve registry.docker.com/library/ruby:3.1.0-slim@sha256:d2ec60a604ba35e726ba8721c9344a83888b0d11f2b4f2d56a117e53eac6295a done
DEBUG [cc0446bb] #10 DONE 0.0s
DEBUG [cc0446bb]
DEBUG [cc0446bb] #11 [linux/amd64 base 2/2] WORKDIR /rails
DEBUG [cc0446bb] #11 CACHED
DEBUG [cc0446bb]
DEBUG [cc0446bb] #12 [linux/amd64 build 1/9] RUN apt-get update -qq && apt-get install --no-install-recommends -y build-essential curl git libpq-dev libvips node-gyp pkg-config python-is-python3
DEBUG [cc0446bb] #12 CACHED
DEBUG [cc0446bb]
DEBUG [cc0446bb] #13 [linux/amd64 stage-2 1/4] RUN apt-get update -qq && apt-get install --no-install-recommends -y curl libvips postgresql-client && rm -rf /var/lib/apt/lists /var/cache/apt/archives
DEBUG [cc0446bb] #13 CACHED
DEBUG [cc0446bb]
DEBUG [cc0446bb] #14 [internal] load build context
DEBUG [cc0446bb] #14 transferring context: 3.41MB 0.1s done
DEBUG [cc0446bb] #14 DONE 0.1s
DEBUG [cc0446bb]
DEBUG [cc0446bb] #15 [linux/arm64 build 7/9] COPY . .
DEBUG [cc0446bb] #15 CACHED
DEBUG [cc0446bb]
DEBUG [cc0446bb] #16 [linux/arm64 build 2/9] RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && /tmp/node-build-master/bin/node-build "18.18.2" /usr/local/node && npm install -g yarn@1.22.21 && rm -rf /tmp/node-build-master
DEBUG [cc0446bb] #16 CACHED
DEBUG [cc0446bb]
DEBUG [cc0446bb] #17 [linux/arm64 build 3/9] COPY Gemfile Gemfile.lock ./
DEBUG [cc0446bb] #17 CACHED
DEBUG [cc0446bb]
DEBUG [cc0446bb] #18 [linux/arm64 build 4/9] RUN bundle install && rm -rf ~/.bundle/ "/usr/local/bundle"/ruby/*/cache "/usr/local/bundle"/ruby/*/bundler/gems/*/.git && bundle exec bootsnap precompile --gemfile
DEBUG [cc0446bb] #18 CACHED
DEBUG [cc0446bb]
DEBUG [cc0446bb] #19 [linux/arm64 build 6/9] RUN yarn install --frozen-lockfile
DEBUG [cc0446bb] #19 CACHED
DEBUG [cc0446bb]
DEBUG [cc0446bb] #20 [linux/arm64 build 1/9] RUN apt-get update -qq && apt-get install --no-install-recommends -y build-essential curl git libpq-dev libvips node-gyp pkg-config python-is-python3
DEBUG [cc0446bb] #20 CACHED
DEBUG [cc0446bb]
DEBUG [cc0446bb] #21 [linux/arm64 build 5/9] COPY package.json yarn.lock ./
DEBUG [cc0446bb] #21 CACHED
DEBUG [cc0446bb]
DEBUG [cc0446bb] #22 [linux/arm64 build 8/9] RUN bundle exec bootsnap precompile app/ lib/
DEBUG [cc0446bb] #22 CACHED
DEBUG [cc0446bb]
DEBUG [cc0446bb] #23 [linux/arm64 build 9/9] RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
DEBUG [cc0446bb] #23 0.102 /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:357:in `block in normalize_options': (Bundler::Dsl::DSLError)
DEBUG [cc0446bb] #23 0.102 [!] There was an error parsing `Gemfile`: `windows` is not a valid platform. The available options are: [:ruby, :ruby_18, :ruby_19, :ruby_20, :ruby_21, :ruby_22, :ruby_23, :ruby_24, :ruby_25, :ruby_26, :mri, :mri_18, :mri_19, :mri_20, :mri_21, :mri_22, :mri_23, :mri_24, :mri_25, :mri_26, :rbx, :truffleruby, :jruby, :jruby_18, :jruby_19, :mswin, :mswin_18, :mswin_19, :mswin_20, :mswin_21, :mswin_22, :mswin_23, :mswin_24, :mswin_25, :mswin_26, :mswin64, :mswin64_19, :mswin64_20, :mswin64_21, :mswin64_22, :mswin64_23, :mswin64_24, :mswin64_25, :mswin64_26, :mingw, :mingw_18, :mingw_19, :mingw_20, :mingw_21, :mingw_22, :mingw_23, :mingw_24, :mingw_25, :mingw_26, :x64_mingw, :x64_mingw_20, :x64_mingw_21, :x64_mingw_22, :x64_mingw_23, :x64_mingw_24, :x64_mingw_25, :x64_mingw_26]. Bundler cannot continue.
DEBUG [cc0446bb] #23 0.102
DEBUG [cc0446bb] #23 0.102 # from /rails/Gemfile:42
DEBUG [cc0446bb] #23 0.102 # -------------------------------------------
DEBUG [cc0446bb] #23 0.102 # # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
DEBUG [cc0446bb] #23 0.102 > gem 'tzinfo-data', platforms: %i[ windows jruby ]
DEBUG [cc0446bb] #23 0.102 #
DEBUG [cc0446bb] #23 0.102 # -------------------------------------------
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:355:in `each'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:355:in `normalize_options'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:100:in `gem'
DEBUG [cc0446bb] #23 0.102 from /rails/Gemfile:42:in `eval_gemfile'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:49:in `instance_eval'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:49:in `eval_gemfile'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:12:in `evaluate'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/definition.rb:38:in `build'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler.rb:197:in `definition'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler.rb:145:in `setup'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/setup.rb:20:in `block in <top (required)>'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/ui/shell.rb:136:in `with_level'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/ui/shell.rb:88:in `silence'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/setup.rb:20:in `<top (required)>'
DEBUG [cc0446bb] #23 0.102 from <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
DEBUG [cc0446bb] #23 0.102 from <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
DEBUG [cc0446bb] #23 0.102 from /rails/config/boot.rb:3:in `<top (required)>'
DEBUG [cc0446bb] #23 0.102 from ./bin/rails:3:in `require_relative'
DEBUG [cc0446bb] #23 0.102 from ./bin/rails:3:in `<main>'
DEBUG [cc0446bb] #23 0.102 /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:357:in `block in normalize_options': `windows` is not a valid platform. The available options are: [:ruby, :ruby_18, :ruby_19, :ruby_20, :ruby_21, :ruby_22, :ruby_23, :ruby_24, :ruby_25, :ruby_26, :mri, :mri_18, :mri_19, :mri_20, :mri_21, :mri_22, :mri_23, :mri_24, :mri_25, :mri_26, :rbx, :truffleruby, :jruby, :jruby_18, :jruby_19, :mswin, :mswin_18, :mswin_19, :mswin_20, :mswin_21, :mswin_22, :mswin_23, :mswin_24, :mswin_25, :mswin_26, :mswin64, :mswin64_19, :mswin64_20, :mswin64_21, :mswin64_22, :mswin64_23, :mswin64_24, :mswin64_25, :mswin64_26, :mingw, :mingw_18, :mingw_19, :mingw_20, :mingw_21, :mingw_22, :mingw_23, :mingw_24, :mingw_25, :mingw_26, :x64_mingw, :x64_mingw_20, :x64_mingw_21, :x64_mingw_22, :x64_mingw_23, :x64_mingw_24, :x64_mingw_25, :x64_mingw_26] (Bundler::GemfileError)
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:355:in `each'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:355:in `normalize_options'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:100:in `gem'
DEBUG [cc0446bb] #23 0.102 from /rails/Gemfile:42:in `eval_gemfile'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:49:in `instance_eval'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:49:in `eval_gemfile'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:12:in `evaluate'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/definition.rb:38:in `build'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler.rb:197:in `definition'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler.rb:145:in `setup'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/setup.rb:20:in `block in <top (required)>'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/ui/shell.rb:136:in `with_level'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/ui/shell.rb:88:in `silence'
DEBUG [cc0446bb] #23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/setup.rb:20:in `<top (required)>'
DEBUG [cc0446bb] #23 0.102 from <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
DEBUG [cc0446bb] #23 0.102 from <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
DEBUG [cc0446bb] #23 0.102 from /rails/config/boot.rb:3:in `<top (required)>'
DEBUG [cc0446bb] #23 0.102 from ./bin/rails:3:in `require_relative'
DEBUG [cc0446bb] #23 0.102 from ./bin/rails:3:in `<main>'
DEBUG [cc0446bb] #23 ERROR: process "/bin/sh -c SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile" did not complete successfully: exit code: 1
DEBUG [cc0446bb]
DEBUG [cc0446bb] #24 [linux/amd64 build 2/9] RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && /tmp/node-build-master/bin/node-build "18.18.2" /usr/local/node && npm install -g yarn@1.22.21 && rm -rf /tmp/node-build-master
DEBUG [cc0446bb] #24 CANCELED
DEBUG [cc0446bb] ------
DEBUG [cc0446bb] > [linux/arm64 build 9/9] RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile:
DEBUG [cc0446bb] 0.102 from /usr/local/lib/ruby/3.1.0/bundler.rb:145:in `setup'
DEBUG [cc0446bb] 0.102 from /usr/local/lib/ruby/3.1.0/bundler/setup.rb:20:in `block in <top (required)>'
DEBUG [cc0446bb] 0.102 from /usr/local/lib/ruby/3.1.0/bundler/ui/shell.rb:136:in `with_level'
DEBUG [cc0446bb] 0.102 from /usr/local/lib/ruby/3.1.0/bundler/ui/shell.rb:88:in `silence'
DEBUG [cc0446bb] 0.102 from /usr/local/lib/ruby/3.1.0/bundler/setup.rb:20:in `<top (required)>'
DEBUG [cc0446bb] 0.102 from <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
DEBUG [cc0446bb] 0.102 from <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
DEBUG [cc0446bb] 0.102 from /rails/config/boot.rb:3:in `<top (required)>'
DEBUG [cc0446bb] 0.102 from ./bin/rails:3:in `require_relative'
DEBUG [cc0446bb] 0.102 from ./bin/rails:3:in `<main>'
DEBUG [cc0446bb] ------
DEBUG [cc0446bb]
DEBUG [cc0446bb] 2 warnings found (use --debug to expand):
DEBUG [cc0446bb] - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 5)
DEBUG [cc0446bb] - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 18)
DEBUG [cc0446bb] Dockerfile:50
DEBUG [cc0446bb] --------------------
DEBUG [cc0446bb] 48 |
DEBUG [cc0446bb] 49 | # Precompiling assets for production without requiring secret RAILS_MASTER_KEY
DEBUG [cc0446bb] 50 | >>> RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
DEBUG [cc0446bb] 51 |
DEBUG [cc0446bb] 52 |
DEBUG [cc0446bb] --------------------
DEBUG [cc0446bb] ERROR: failed to solve: process "/bin/sh -c SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile" did not complete successfully: exit code: 1
Finished all in 3.8 seconds
Releasing the deploy lock...
Finished all in 10.2 seconds
ERROR (SSHKit::Command::Failed): docker exit status: 256
docker stdout: Nothing written
docker stderr: #0 building with "kamal-rails_app_name-multiarch" instance using docker-container driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 2.44kB done
#1 DONE 0.0s
#2 resolve image config for docker-image://docker.io/docker/dockerfile:1
#2 DONE 0.8s
#3 docker-image://docker.io/docker/dockerfile:1@sha256:fe40cf4e92cd0c467be2cfc30657a680ae2398318afd50b0c80585784c604f28
#3 resolve docker.io/docker/dockerfile:1@sha256:fe40cf4e92cd0c467be2cfc30657a680ae2398318afd50b0c80585784c604f28 done
#3 CACHED
#4 [linux/amd64 internal] load metadata for registry.docker.com/library/ruby:3.1.0-slim
#4 DONE 0.8s
#5 [linux/arm64 internal] load metadata for registry.docker.com/library/ruby:3.1.0-slim
#5 DONE 0.8s
#6 [internal] load .dockerignore
#6 transferring context: 745B done
#6 DONE 0.0s
#7 [linux/arm64 base 1/2] FROM registry.docker.com/library/ruby:3.1.0-slim@sha256:d2ec60a604ba35e726ba8721c9344a83888b0d11f2b4f2d56a117e53eac6295a
#7 resolve registry.docker.com/library/ruby:3.1.0-slim@sha256:d2ec60a604ba35e726ba8721c9344a83888b0d11f2b4f2d56a117e53eac6295a done
#7 DONE 0.0s
#8 [linux/arm64 base 2/2] WORKDIR /rails
#8 CACHED
#9 [linux/arm64 stage-2 1/4] RUN apt-get update -qq && apt-get install --no-install-recommends -y curl libvips postgresql-client && rm -rf /var/lib/apt/lists /var/cache/apt/archives
#9 CACHED
#10 [linux/amd64 base 1/2] FROM registry.docker.com/library/ruby:3.1.0-slim@sha256:d2ec60a604ba35e726ba8721c9344a83888b0d11f2b4f2d56a117e53eac6295a
#10 resolve registry.docker.com/library/ruby:3.1.0-slim@sha256:d2ec60a604ba35e726ba8721c9344a83888b0d11f2b4f2d56a117e53eac6295a done
#10 DONE 0.0s
#11 [linux/amd64 base 2/2] WORKDIR /rails
#11 CACHED
#12 [linux/amd64 build 1/9] RUN apt-get update -qq && apt-get install --no-install-recommends -y build-essential curl git libpq-dev libvips node-gyp pkg-config python-is-python3
#12 CACHED
#13 [linux/amd64 stage-2 1/4] RUN apt-get update -qq && apt-get install --no-install-recommends -y curl libvips postgresql-client && rm -rf /var/lib/apt/lists /var/cache/apt/archives
#13 CACHED
#14 [internal] load build context
#14 transferring context: 3.41MB 0.1s done
#14 DONE 0.1s
#15 [linux/arm64 build 7/9] COPY . .
#15 CACHED
#16 [linux/arm64 build 2/9] RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && /tmp/node-build-master/bin/node-build "18.18.2" /usr/local/node && npm install -g yarn@1.22.21 && rm -rf /tmp/node-build-master
#16 CACHED
#17 [linux/arm64 build 3/9] COPY Gemfile Gemfile.lock ./
#17 CACHED
#18 [linux/arm64 build 4/9] RUN bundle install && rm -rf ~/.bundle/ "/usr/local/bundle"/ruby/*/cache "/usr/local/bundle"/ruby/*/bundler/gems/*/.git && bundle exec bootsnap precompile --gemfile
#18 CACHED
#19 [linux/arm64 build 6/9] RUN yarn install --frozen-lockfile
#19 CACHED
#20 [linux/arm64 build 1/9] RUN apt-get update -qq && apt-get install --no-install-recommends -y build-essential curl git libpq-dev libvips node-gyp pkg-config python-is-python3
#20 CACHED
#21 [linux/arm64 build 5/9] COPY package.json yarn.lock ./
#21 CACHED
#22 [linux/arm64 build 8/9] RUN bundle exec bootsnap precompile app/ lib/
#22 CACHED
#23 [linux/arm64 build 9/9] RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
#23 0.102 /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:357:in `block in normalize_options': (Bundler::Dsl::DSLError)
#23 0.102 [!] There was an error parsing `Gemfile`: `windows` is not a valid platform. The available options are: [:ruby, :ruby_18, :ruby_19, :ruby_20, :ruby_21, :ruby_22, :ruby_23, :ruby_24, :ruby_25, :ruby_26, :mri, :mri_18, :mri_19, :mri_20, :mri_21, :mri_22, :mri_23, :mri_24, :mri_25, :mri_26, :rbx, :truffleruby, :jruby, :jruby_18, :jruby_19, :mswin, :mswin_18, :mswin_19, :mswin_20, :mswin_21, :mswin_22, :mswin_23, :mswin_24, :mswin_25, :mswin_26, :mswin64, :mswin64_19, :mswin64_20, :mswin64_21, :mswin64_22, :mswin64_23, :mswin64_24, :mswin64_25, :mswin64_26, :mingw, :mingw_18, :mingw_19, :mingw_20, :mingw_21, :mingw_22, :mingw_23, :mingw_24, :mingw_25, :mingw_26, :x64_mingw, :x64_mingw_20, :x64_mingw_21, :x64_mingw_22, :x64_mingw_23, :x64_mingw_24, :x64_mingw_25, :x64_mingw_26]. Bundler cannot continue.
#23 0.102
#23 0.102 # from /rails/Gemfile:42
#23 0.102 # -------------------------------------------
#23 0.102 # # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
#23 0.102 > gem 'tzinfo-data', platforms: %i[ windows jruby ]
#23 0.102 #
#23 0.102 # -------------------------------------------
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:355:in `each'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:355:in `normalize_options'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:100:in `gem'
#23 0.102 from /rails/Gemfile:42:in `eval_gemfile'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:49:in `instance_eval'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:49:in `eval_gemfile'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:12:in `evaluate'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/definition.rb:38:in `build'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler.rb:197:in `definition'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler.rb:145:in `setup'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/setup.rb:20:in `block in <top (required)>'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/ui/shell.rb:136:in `with_level'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/ui/shell.rb:88:in `silence'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/setup.rb:20:in `<top (required)>'
#23 0.102 from <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
#23 0.102 from <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
#23 0.102 from /rails/config/boot.rb:3:in `<top (required)>'
#23 0.102 from ./bin/rails:3:in `require_relative'
#23 0.102 from ./bin/rails:3:in `<main>'
#23 0.102 /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:357:in `block in normalize_options': `windows` is not a valid platform. The available options are: [:ruby, :ruby_18, :ruby_19, :ruby_20, :ruby_21, :ruby_22, :ruby_23, :ruby_24, :ruby_25, :ruby_26, :mri, :mri_18, :mri_19, :mri_20, :mri_21, :mri_22, :mri_23, :mri_24, :mri_25, :mri_26, :rbx, :truffleruby, :jruby, :jruby_18, :jruby_19, :mswin, :mswin_18, :mswin_19, :mswin_20, :mswin_21, :mswin_22, :mswin_23, :mswin_24, :mswin_25, :mswin_26, :mswin64, :mswin64_19, :mswin64_20, :mswin64_21, :mswin64_22, :mswin64_23, :mswin64_24, :mswin64_25, :mswin64_26, :mingw, :mingw_18, :mingw_19, :mingw_20, :mingw_21, :mingw_22, :mingw_23, :mingw_24, :mingw_25, :mingw_26, :x64_mingw, :x64_mingw_20, :x64_mingw_21, :x64_mingw_22, :x64_mingw_23, :x64_mingw_24, :x64_mingw_25, :x64_mingw_26] (Bundler::GemfileError)
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:355:in `each'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:355:in `normalize_options'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:100:in `gem'
#23 0.102 from /rails/Gemfile:42:in `eval_gemfile'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:49:in `instance_eval'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:49:in `eval_gemfile'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/dsl.rb:12:in `evaluate'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/definition.rb:38:in `build'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler.rb:197:in `definition'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler.rb:145:in `setup'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/setup.rb:20:in `block in <top (required)>'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/ui/shell.rb:136:in `with_level'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/ui/shell.rb:88:in `silence'
#23 0.102 from /usr/local/lib/ruby/3.1.0/bundler/setup.rb:20:in `<top (required)>'
#23 0.102 from <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
#23 0.102 from <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
#23 0.102 from /rails/config/boot.rb:3:in `<top (required)>'
#23 0.102 from ./bin/rails:3:in `require_relative'
#23 0.102 from ./bin/rails:3:in `<main>'
#23 ERROR: process "/bin/sh -c SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile" did not complete successfully: exit code: 1
#24 [linux/amd64 build 2/9] RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && /tmp/node-build-master/bin/node-build "18.18.2" /usr/local/node && npm install -g yarn@1.22.21 && rm -rf /tmp/node-build-master
#24 CANCELED
------
> [linux/arm64 build 9/9] RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile:
0.102 from /usr/local/lib/ruby/3.1.0/bundler.rb:145:in `setup'
0.102 from /usr/local/lib/ruby/3.1.0/bundler/setup.rb:20:in `block in <top (required)>'
0.102 from /usr/local/lib/ruby/3.1.0/bundler/ui/shell.rb:136:in `with_level'
0.102 from /usr/local/lib/ruby/3.1.0/bundler/ui/shell.rb:88:in `silence'
0.102 from /usr/local/lib/ruby/3.1.0/bundler/setup.rb:20:in `<top (required)>'
0.102 from <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
0.102 from <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
0.102 from /rails/config/boot.rb:3:in `<top (required)>'
0.102 from ./bin/rails:3:in `require_relative'
0.102 from ./bin/rails:3:in `<main>'
------
2 warnings found (use --debug to expand):
- FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 5)
- FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 18)
Dockerfile:50
--------------------
48 |
49 | # Precompiling assets for production without requiring secret RAILS_MASTER_KEY
50 | >>> RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
51 |
52 |
--------------------
ERROR: failed to solve: process "/bin/sh -c SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile" did not complete successfully: exit code: 1
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
so far i can see a couple of things, ensure you commit before trying to deploy with kamal
ensure you are using bundler version 2.3.22 or higher, that when
|
Beta Was this translation helpful? Give feedback.
-
I got past the error by specifying the Ruby version on the # Configure builder setup.
builder:
args:
RUBY_VERSION: 3.2.2 Now I have a different issue which has to do with the > [linux/arm64 build 4/9] RUN bundle install && rm -rf ~/.bundle/ "/usr/local/bundle"/ruby/*/cache "/usr/local/bundle"/ruby/*/bundler/gems/*/.git && bundle exec bootsnap precompile --gemfile:
0.102 Bundler 2.4.10 is running, but your lockfile was generated with 2.4.3. Installing Bundler 2.4.3 and restarting using that version.
.
76.06 Fetching bundler 2.4.3
76.83 Installing bundler 2.4.3
77.02 Your Ruby version is 3.2.2, but your Gemfile specified 3.1.0 Thanks for the helpful tips @acidtib, committing the files solved this issue. 🙏 Then I had an unauthorized error but changing the |
Beta Was this translation helpful? Give feedback.
so far i can see a couple of things,
ensure you commit before trying to deploy with kamal
ensure you are using bundler version 2.3.22 or higher, that when
:windows
alias was addedhttps://github.com/rubygems/rubygems/blob/master/bundler/CHANGELOG.md#2322-september-7-2022