DEV Community

n350071🇯🇵
n350071🇯🇵

Posted on

2 1

When Rails in Docker goes to down...

🤔 Situation

  • Environment

    • Rails 6.1
    • Rails in Docker
    • AWS EC2
  • Fully works on development mode

  • Don't work on EC2 with docker compose

🚀 Treatment

Check standard logs.
This command shows standard log.

docker ps

CONTAINER ID ... NAMES
36b68a26fc66 ... xxx_web_1

docker logs xxx_web_1
# it shows standard log
Enter fullscreen mode Exit fullscreen mode

😅 In my case

The name of file and class are different.
The production mode eager loads all file before starting.
That's the why.

! Unable to load application: Zeitwerk::NameError: expected file /null_strategy.rb to define constant Strategies::Jobs::NullStrategy, but didn't
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay