Search⌘ K

The Downside to Our Existing Approach

Explore the limitations of rebuilding Docker images for gem management in Rails projects. Learn why this approach slows gem updates due to Docker and Bundler caching conflicts. Discover alternative gem management techniques to improve development efficiency and make informed choices based on your project needs.

Gem management

We now have a working development environment, completely based on Docker. However, there is one area that is worth a bit more thought: gem management.

Up until now, to install or update gems, we have simply been rebuilding the image for our Rails app. This works because bundle install is one of the steps in our Dockerfile. However, as we will see in a moment, there is a slight downside to this approach compared to what we are used to when managing gems in a non-Dockerized environment.

We will explore an alternative approach to managing our gems, which attempts to avoid the drawback by making different trade-offs (it’s more complicated ...