DEV Community

Marcelo Toledo
Marcelo Toledo

Posted on

How to hide Ruby 2.7 deprecation warnings in docker

Tired of Ruby ​​2.7 alerts in your docker application? Put this key into your environment: RUBYOPT=-W0. In your docker-compose.yml:

# docker-compose.yml

version: '3.6'

services:
  server:
    image: "your_image"
    container_name: "your_application_name"
    ports:
      - "3000:3000"
    environment:
      - BUNDLE_PATH=vendor/bundle
      - BUNDLE_DISABLE_SHARED_GEMS=1
      - RUBYOPT=-W0

Cheers 🍻

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

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

Okay