[Bundler] Enhancing Your Workflow with Bundler's Auto-Install

Enhancing Your Workflow with Bundler’s Auto-Install

Working in a large monolithic application often means dealing with frequent changes from multiple engineers. Every time you pull from main, you’re likely to encounter the familiar ritual of running bundle install, followed by rails db:prepare if you’re on a Rails application. Missing the bundle install step can lead to frustrating errors like:

1
2
Could not find X-1.2.3 in locally installed gems
Run `bundle install` to install missing gems.

With Bundler 2.5.10, there’s a game-changing update: the auto_install config. By setting this in your project or globally:

1
2
3
bundle config auto_install true
# or
bundle config --global auto_install true

Bundler will automatically install missing gems on demand. While auto_install isn’t new, it now supports any command that uses require "bundler/setup", including binstubs.