DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 970,177 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
n350071πŸ‡―πŸ‡΅
n350071πŸ‡―πŸ‡΅

Posted on

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)

πŸ‘‹ Hey, my name is Noah and I’m the one who set up this ad. My job is to get you to join DEV, so if you fancy doing me a favor, I’d love for you to create an account.

If you found DEV from searching around, here are a couple of our most popular articles on DEV: