DEV Community

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)