Dev, don’t put Rails on the whale

Kadu Diógenes

The image below is from a great post on the same subject:

If you need, or if you just want to do it, go on!

In my project I use Rails, docker and docker-compose. I install Rails local and use a Procfile to start other services through docker-compose.

The services used in this project are PostgreSQL, Redis and ElasticSearch.

For me this is the perfect configuration for a development environment. Tools like rvm and rbenv are a breeze to manage project specific gems and after years working with them, I never find a gem with native extensions that work on my machine, but not on production environments.

These tools also allows for multiple Ruby/Rails versions without any layer beyond YARV. Why I would want to use docker to replace any of these tools?

The benefits of not using docker goes beyond this. Without it, you can easily use spring, pry, bundle open, bundle install works smooth and other debug tools that needs an interactive shell.

I use docker/docker-compose only for dependent services. This way I can use exactly the same versions as the ones used in production without worry about my system packages.

Docker is cool, but above all, it need to be useful.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade