Rails app deploy failing after updating Docker file

So after the upgrade to V2, I’ve had a few issues, which I’ve been able to fix with the help of these forums and fly.io staff :smiling_face_with_three_hearts:.

I’ve now updated my docker file with the following command

bundle add dockerfile-rails --optimistic --group development
bin/rails generate dockerfile

but I’m getting the following error when I try to deploy

[1/2] Checking that 3287dd0a642585 [worker] is up and running
Smoke checks for 3287dd0a642585 failed: the app appears to be crashing
Check its logs: here's the last lines below, or run 'fly logs -i 3287dd0a642585':
  Successfully prepared image registry.fly.io/trade:deployment-01H1K0C3FNQBCEE8BVXC5D9Y5M (1.325913232s)
  Configuring firecracker
  Starting init (commit: 8af0ddf)...
  Preparing to run: `/rails/bin/docker-entrypoint bundle exec sidekiq` as rails
  2023/05/29 05:46:22 listening on [fdaa:1:e40:a7b:81:6ead:f927:2]:22 (DNS: [fdaa::3]:53)
  bundler: failed to load command: sidekiq (/rails/vendor/bundle/ruby/3.1.0/bin/sidekiq)
  /rails/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require': cannot load such file -- /rails/vendor/bundle/ruby/3.1.0/gems/mail-2.8.0/lib/mail/indifferent_hash.rb (LoadError)

I’m currently out of ideas on how to fix this one, has anyone got any suggestions?

I’ve just tried to delete the fly.io app and re-launch it, but I still get the same issue.

Dockerfile

# syntax = docker/dockerfile:1

# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
ARG RUBY_VERSION=3.1.2
FROM ruby:$RUBY_VERSION-slim as base

# Rails app lives here
WORKDIR /rails

# Set production environment
ENV RAILS_ENV="production" \
    BUNDLE_WITHOUT="development:test" \
    BUNDLE_DEPLOYMENT="1"

# Update gems and bundler
RUN gem update --system --no-document && \
    gem install -N bundler


# Throw-away build stage to reduce size of final image
FROM base as build

# Install packages needed to build gems
RUN apt-get update -qq && \
    apt-get install --no-install-recommends -y build-essential default-libmysqlclient-dev libvips

# Install application gems
COPY --link Gemfile Gemfile.lock ./
RUN bundle install && \
    bundle exec bootsnap precompile --gemfile && \
    rm -rf ~/.bundle/ $BUNDLE_PATH/ruby/*/cache $BUNDLE_PATH/ruby/*/bundler/gems/*/.git

# Copy application code
COPY --link . .

# Precompile bootsnap code for faster boot times
RUN bundle exec bootsnap precompile app/ lib/

# Precompiling assets for production without requiring secret RAILS_MASTER_KEY
RUN SECRET_KEY_BASE=DUMMY ./bin/rails assets:precompile ASSET_COMPILE=1

# Final stage for app image
FROM base

# Install packages needed for deployment
RUN apt-get update -qq && \
    apt-get install --no-install-recommends -y default-mysql-client imagemagick libvips && \
    rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Copy built artifacts: gems, application
COPY --from=build /usr/local/bundle /usr/local/bundle
COPY --from=build /rails /rails

# Run and own only the runtime files as a non-root user for security
RUN useradd rails --create-home --shell /bin/bash && \
    chown -R rails:rails db log storage tmp
USER rails:rails

# Deployment options
ENV RAILS_LOG_TO_STDOUT="1" \
    RAILS_SERVE_STATIC_FILES="true"

# Entrypoint prepares the database.
ENTRYPOINT ["/rails/bin/docker-entrypoint"]

# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
CMD ["./bin/rails", "server"]

fly.toml

# fly.toml app configuration file generated for trade on 2023-05-29T14:26:58+04:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "trade"
primary_region = "sin"
console_command = "/rails/bin/rails console"

[http_service]
  internal_port = 3000
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0

[[statics]]
  guest_path = "/rails/public"
  url_prefix = "/"

You are still getting this message with the new app? I don’t see bundle exec sidekiq in either your Dockerfile or fly.toml.

@rubys Yea, I still get the error. I’ve removed the worker to try and diagnose the issue as I thought it may have been an issue with sidekiq, but it looks like it’s something else.

This is what I get when I try and deploy now.

Smoke checks for 5683de3cd0328e failed: the app appears to be crashing
Check its logs: here's the last lines below, or run 'fly logs -i 5683de3cd0328e':
  Successfully prepared image registry.fly.io/trade:deployment-01H1KNEN1EZ54PN03EDVJN7DEW (19.698794848s)
  Configuring firecracker
  Starting init (commit: 8af0ddf)...
  Preparing to run: `/rails/bin/docker-entrypoint ./bin/rails server` as rails
  2023/05/29 11:51:07 listening on [fdaa:1:e40:a7b:ead:c7b1:19b9:2]:22 (DNS: [fdaa::3]:53)
  rails aborted!
  LoadError: cannot load such file -- /rails/vendor/bundle/ruby/3.1.0/gems/mail-2.8.0/lib/mail/indifferent_hash.rb
  <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
  <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
  /rails/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
  /rails/vendor/bundle/ruby/3.1.0/gems/mail-2.8.0/lib/mail.rb:14:in `<module:Mail>'
  /rails/vendor/bundle/ruby/3.1.0/gems/mail-2.8.0/lib/mail.rb:3:in `<main>'

It seems like it’s not installing gems properly??

The build process looks OK to me though.

==> Verifying app config
Validating /Users/apple/code/d-trade/fly.toml
Platform: machines
✓ Configuration is valid
--> Verified app config
==> Building image
Remote builder fly-builder-purple-feather-2713 ready
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
[+] Building 2.3s (0/1)                                                                                                                                          
[+] Building 14.5s (19/19) FINISHED                                                                                                                              
 => [internal] load remote build context                                                                                                                    0.0s
 => copy /context /                                                                                                                                         0.1s
 => resolve image config for docker.io/docker/dockerfile:1                                                                                                  0.8s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:39b85bbfa7536a5feceb7372a0817649ecb2724562a38360f4d6a7782a409b14                             0.0s
 => [internal] load metadata for docker.io/library/ruby:3.1.2-slim                                                                                          0.3s
 => [base 1/3] FROM docker.io/library/ruby:3.1.2-slim@sha256:5d413e301f37cbe63a54dadded2f347496165c1de0dbe342d1f0f0d47e25b2be                               0.0s
 => CACHED [base 2/3] WORKDIR /rails                                                                                                                        0.0s
 => CACHED [base 3/3] RUN gem update --system --no-document &&     gem install -N bundler                                                                   0.0s
 => CACHED [build 1/6] RUN apt-get update -qq &&     apt-get install --no-install-recommends -y build-essential default-libmysqlclient-dev libvips          0.0s
 => CACHED [build 2/6] COPY --link Gemfile Gemfile.lock ./                                                                                                  0.0s
 => CACHED [build 3/6] RUN bundle install &&     bundle exec bootsnap precompile --gemfile &&     rm -rf ~/.bundle/ $BUNDLE_PATH/ruby/*/cache $BUNDLE_PATH  0.0s
 => [build 4/6] COPY --link . .                                                                                                                             0.1s
 => [build 5/6] RUN bundle exec bootsnap precompile app/ lib/                                                                                               0.9s
 => [build 6/6] RUN SECRET_KEY_BASE=DUMMY ./bin/rails assets:precompile ASSET_COMPILE=1                                                                     4.2s
 => CACHED [stage-2 1/4] RUN apt-get update -qq &&     apt-get install --no-install-recommends -y default-mysql-client imagemagick libvips &&     rm -rf /  0.0s 
 => CACHED [stage-2 2/4] COPY --from=build /usr/local/bundle /usr/local/bundle                                                                              0.0s 
 => [stage-2 3/4] COPY --from=build /rails /rails                                                                                                           1.4s 
 => [stage-2 4/4] RUN useradd rails --create-home --shell /bin/bash &&     chown -R rails:rails db log storage tmp                                          2.6s 
 => exporting to image                                                                                                                                      2.1s 
 => => exporting layers                                                                                                                                     2.1s 
 => => writing image sha256:8d4d81f27853a6b551b8fe9d2f5d861c79eddae26484ed2f0c403bb49f6f26a3                                                                0.0s
 => => naming to registry.fly.io/trade:deployment-01H1KSJBHFTC4Y0F90ET49HXE6                                                                                0.0s
--> Building image done
==> Pushing image to fly
The push refers to repository [registry.fly.io/trade]
b6db03300142: Pushed 
08f2268e3da7: Pushed 
c0dcb4e75d34: Layer already exists 
e76bcbc81ac0: Layer already exists 
80bcf7dcdf63: Layer already exists 
9d9ddce5328d: Layer already exists 
f0fc506f7982: Layer already exists 
46cf0e48c979: Layer already exists 
c3e35b2afb23: Layer already exists 
b7fcac299347: Layer already exists 
ec4a38999118: Layer already exists 
deployment-01H1KSJBHFTC4Y0F90ET49HXE6: digest: sha256:9d714f41241aee0e0defe8a207cb17a370a7cc0dfbf0caf0231c2b8c22d51ab7 size: 2633
--> Pushing image done
image: registry.fly.io/trade:deployment-01H1KSJBHFTC4Y0F90ET49HXE6
image size: 716 MB

Watch your app at https://fly.io/apps/trade/monitoring

Updating existing machines in 'trade' with rolling strategy
  Machine 5683de3cd0328e [app] has state: started
  [1/1] Checking that 5683de3cd0328e [app] is up and running
Smoke checks for 5683de3cd0328e failed: the app appears to be crashing

What this is saying is that the builder is using the gems from a previous bundle install. Just to rule out the possibility that a previous bundle install failed (but returned a successful return code), try deleting the builder and re-deploying:

fly apps destroy -y fly-builder-purple-feather-2713
fly deploy

Just tried it, and it still gets the same error.

I’m playing around with a test app and I’ve added all the gems I have in the Rails app that isn’t working, and that’s deploying OK. Both apps are on the same version of Rails and Ruby.

Could be something in my rails config files that’s causing an issue??

Destroyed app fly-builder-purple-feather-2713
==> Verifying app config
Validating /Users/apple/code/d-trade/fly.toml
Platform: machines
✓ Configuration is valid
--> Verified app config
==> Building image
Remote builder fly-builder-green-shape-3662 ready
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
[+] Building 2.0s (0/1)                                                                                                                                                                    
[+] Building 74.6s (19/19) FINISHED                                                                                                                                                        
 => [internal] load remote build context                                                                                                                                              0.0s
 => copy /context /                                                                                                                                                                   0.1s
 => resolve image config for docker.io/docker/dockerfile:1                                                                                                                            0.9s
 => docker-image://docker.io/docker/dockerfile:1@sha256:39b85bbfa7536a5feceb7372a0817649ecb2724562a38360f4d6a7782a409b14                                                              0.6s
 => => resolve docker.io/docker/dockerfile:1@sha256:39b85bbfa7536a5feceb7372a0817649ecb2724562a38360f4d6a7782a409b14                                                                  0.0s
 => => sha256:dbdd11720762ad504260c66161c964e59eba06b95a7aa64a68634b598a830a91 2.90kB / 2.90kB                                                                                        0.0s
 => => sha256:a47ff7046597eea0123ea02817165350e3680f75000dc5d69c9a310258e1bedd 11.55MB / 11.55MB                                                                                      0.4s
 => => sha256:39b85bbfa7536a5feceb7372a0817649ecb2724562a38360f4d6a7782a409b14 8.40kB / 8.40kB                                                                                        0.0s
 => => sha256:966d40f9ba8366e74c2fa353fc0bc7bbc167d2a0f3ad2420db8b9e633049462d 482B / 482B                                                                                            0.0s
 => => extracting sha256:a47ff7046597eea0123ea02817165350e3680f75000dc5d69c9a310258e1bedd                                                                                             0.1s
 => [internal] load metadata for docker.io/library/ruby:3.1.2-slim                                                                                                                    0.4s
 => [base 1/3] FROM docker.io/library/ruby:3.1.2-slim@sha256:5d413e301f37cbe63a54dadded2f347496165c1de0dbe342d1f0f0d47e25b2be                                                         2.9s
 => => resolve docker.io/library/ruby:3.1.2-slim@sha256:5d413e301f37cbe63a54dadded2f347496165c1de0dbe342d1f0f0d47e25b2be                                                              0.0s
 => => sha256:5d413e301f37cbe63a54dadded2f347496165c1de0dbe342d1f0f0d47e25b2be 1.86kB / 1.86kB                                                                                        0.0s
 => => sha256:8b6313f29ba49706f49162f71b810515ad0ac08ba020a7ad61e03fc9697023b6 1.37kB / 1.37kB                                                                                        0.0s
 => => sha256:a33c88723d85278ff48e0b3843798d2ce8045253b0cab9a570cd86f3186b7314 5.80kB / 5.80kB                                                                                        0.0s
 => => sha256:a603fa5e3b4127f210503aaa6189abf6286ee5a73deeaab460f8f33ebc6b64e2 31.41MB / 31.41MB                                                                                      0.7s
 => => sha256:824cc1987b4c3d3fdb89192cea3fd492e595844522888b2bdfb7bc0e15d9c38f 10.02MB / 10.02MB                                                                                      0.5s
 => => sha256:36e7129cddea3dc930d634f547f58a869e692c5ea4b3183760620cfc8ec67fb7 199B / 199B                                                                                            0.1s
 => => sha256:e6ebe3be8da43ad18f7bb4ed7711959328c6c9bc23c874d0f827fe9afc3b5e24 32.44MB / 32.44MB                                                                                      1.0s
 => => sha256:cea2535835d7dbc570141035d49ce6acfad3726f456824892ea3fb88fc120278 175B / 175B                                                                                            0.1s
 => => extracting sha256:a603fa5e3b4127f210503aaa6189abf6286ee5a73deeaab460f8f33ebc6b64e2                                                                                             0.8s
 => => extracting sha256:824cc1987b4c3d3fdb89192cea3fd492e595844522888b2bdfb7bc0e15d9c38f                                                                                             0.4s
 => => extracting sha256:36e7129cddea3dc930d634f547f58a869e692c5ea4b3183760620cfc8ec67fb7                                                                                             0.0s
 => => extracting sha256:e6ebe3be8da43ad18f7bb4ed7711959328c6c9bc23c874d0f827fe9afc3b5e24                                                                                             0.6s
 => => extracting sha256:cea2535835d7dbc570141035d49ce6acfad3726f456824892ea3fb88fc120278                                                                                             0.0s
 => [base 2/3] WORKDIR /rails                                                                                                                                                         0.1s
 => [base 3/3] RUN gem update --system --no-document &&     gem install -N bundler                                                                                                    8.4s
 => [build 1/6] RUN apt-get update -qq &&     apt-get install --no-install-recommends -y build-essential default-libmysqlclient-dev libvips                                          21.5s
 => [stage-2 1/4] RUN apt-get update -qq &&     apt-get install --no-install-recommends -y default-mysql-client imagemagick libvips &&     rm -rf /var/lib/apt/lists /var/cache/apt  16.3s
 => [build 2/6] COPY --link Gemfile Gemfile.lock ./                                                                                                                                   0.0s 
 => [build 3/6] RUN bundle install &&     bundle exec bootsnap precompile --gemfile &&     rm -rf ~/.bundle/ $BUNDLE_PATH/ruby/*/cache $BUNDLE_PATH/ruby/*/bundler/gems/*/.git       26.6s 
 => [build 4/6] COPY --link . .                                                                                                                                                       0.1s 
 => [build 5/6] RUN bundle exec bootsnap precompile app/ lib/                                                                                                                         0.9s 
 => [build 6/6] RUN SECRET_KEY_BASE=DUMMY ./bin/rails assets:precompile ASSET_COMPILE=1                                                                                               4.1s 
 => [stage-2 2/4] COPY --from=build /usr/local/bundle /usr/local/bundle                                                                                                               0.2s 
 => [stage-2 3/4] COPY --from=build /rails /rails                                                                                                                                     1.3s 
 => [stage-2 4/4] RUN useradd rails --create-home --shell /bin/bash &&     chown -R rails:rails db log storage tmp                                                                    2.5s 
 => exporting to image                                                                                                                                                                2.2s 
 => => exporting layers                                                                                                                                                               2.2s 
 => => writing image sha256:ff97eb1b50d352db381955b0b92f393f5ac6b9c6626fbf9b4acf5b5444613990                                                                                          0.0s 
 => => naming to registry.fly.io/trade:deployment-01H1KV4X07S496VPP7T4VVMWHC                                                                                                          0.0s
--> Building image done
==> Pushing image to fly
The push refers to repository [registry.fly.io/trade]
2f45755bab80: Pushed 
029ab7efa138: Pushed 
9568c2181aa9: Pushed 
3d8a88a395f1: Pushed 
e2508f9eba05: Pushed 
762e0a4ad326: Pushed 
f0fc506f7982: Layer already exists 
46cf0e48c979: Layer already exists 
c3e35b2afb23: Layer already exists 
b7fcac299347: Layer already exists 
ec4a38999118: Layer already exists 
deployment-01H1KV4X07S496VPP7T4VVMWHC: digest: sha256:79cf273c506b3702d8d49bd39f8f9ba4ca81117ddc93e84b761197dbbc2f09e8 size: 2633
--> Pushing image done
image: registry.fly.io/trade:deployment-01H1KV4X07S496VPP7T4VVMWHC
image size: 716 MB

Watch your app at https://fly.io/apps/trade/monitoring

Updating existing machines in 'trade' with rolling strategy
  Machine 5683de3cd0328e [app] has state: started
  [1/1] Checking that 5683de3cd0328e [app] is up and running
Smoke checks for 5683de3cd0328e failed: the app appears to be crashing
Check its logs: here's the last lines below, or run 'fly logs -i 5683de3cd0328e':
  Successfully prepared image registry.fly.io/trade:deployment-01H1KV4X07S496VPP7T4VVMWHC (21.407759521s)
  Configuring firecracker
  Starting init (commit: 8af0ddf)...
  Preparing to run: `/rails/bin/docker-entrypoint ./bin/rails server` as rails
  2023/05/29 13:31:11 listening on [fdaa:1:e40:a7b:ead:c7b1:19b9:2]:22 (DNS: [fdaa::3]:53)
  <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- /rails/vendor/bundle/ruby/3.1.0/gems/mail-2.8.0/lib/mail/indifferent_hash.rb (LoadError)
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/mail-2.8.0/lib/mail.rb:14:in `<module:Mail>'
        from /rails/vendor/bundle/ruby/3.1.0/gems/mail-2.8.0/lib/mail.rb:3:in `<main>'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/actionmailbox-7.0.4/lib/action_mailbox/mail_ext.rb:3:in `<main>'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/actionmailbox-7.0.4/lib/action_mailbox.rb:3:in `<main>'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/actionmailbox-7.0.4/lib/action_mailbox/engine.rb:9:in `<main>'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /rails/config/application.rb:11:in `<main>'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands/server/server_command.rb:137:in `block in perform'
        from <internal:kernel>:90:in `tap'
        from /rails/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands/server/server_command.rb:134:in `perform'
        from /rails/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        from /rails/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        from /rails/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        from /rails/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/command/base.rb:87:in `perform'
        from /rails/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/command.rb:48:in `invoke'
        from /rails/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands.rb:18:in `<main>'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /rails/bin/rails:4:in `<main>'
  Starting clean up.
  hallpass exited, pid: 514, status: signal: 15
  2023/05/29 13:31:12 listening on [fdaa:1:e40:a7b:ead:c7b1:19b9:2]:22 (DNS: [fdaa::3]:53)
  [    2.120065] reboot: Restarting system
  machine did not have a restart policy, defaulting to restart
  Starting init (commit: 8af0ddf)...
  Preparing to run: `/rails/bin/docker-entrypoint ./bin/rails server` as rails
  2023/05/29 13:31:13 listening on [fdaa:1:e40:a7b:ead:c7b1:19b9:2]:22 (DNS: [fdaa::3]:53)
  <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- /rails/vendor/bundle/ruby/3.1.0/gems/mail-2.8.0/lib/mail/indifferent_hash.rb (LoadError)
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/mail-2.8.0/lib/mail.rb:14:in `<module:Mail>'
        from /rails/vendor/bundle/ruby/3.1.0/gems/mail-2.8.0/lib/mail.rb:3:in `<main>'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/actionmailbox-7.0.4/lib/action_mailbox/mail_ext.rb:3:in `<main>'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/actionmailbox-7.0.4/lib/action_mailbox.rb:3:in `<main>'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/actionmailbox-7.0.4/lib/action_mailbox/engine.rb:9:in `<main>'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /rails/config/application.rb:11:in `<main>'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands/server/server_command.rb:137:in `block in perform'
        from <internal:kernel>:90:in `tap'
        from /rails/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands/server/server_command.rb:134:in `perform'
        from /rails/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        from /rails/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        from /rails/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        from /rails/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/command/base.rb:87:in `perform'
        from /rails/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/command.rb:48:in `invoke'
        from /rails/vendor/bundle/ruby/3.1.0/gems/railties-7.0.4/lib/rails/commands.rb:18:in `<main>'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /rails/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /rails/bin/rails:4:in `<main>'
  Starting clean up.
  hallpass exited, pid: 514, status: signal: 15
  2023/05/29 13:31:14 listening on [fdaa:1:e40:a7b:ead:c7b1:19b9:2]:22 (DNS: [fdaa::3]:53)
Error: smoke checks for 5683de3cd0328e failed: the app appears to be crashing

Next thing to explore: remove your Gemfile.lock and regenerate it using bundle update.

1 Like

This seems to have worked. Thank you so much :smiling_face_with_three_hearts:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.