My Favorite Bundler Feature

03 Jul 2012

If you’re a Ruby developer — and you haven’t been too busy starring in Geico commercials — you are familiar with Bundler.

Bundler solved a real pain point in the lives of Ruby devs: dependency management. It was a rocky road, but we eventually got there and I think it’s safe to say that we’re all better off with Bundler than we were without it.

I’d like to thank everybody who has contributed to Bundler. Your work is much appreciated.

Having used Bundler long enough to take its dependency management feature for granted (snark), I’ve come to know and love another feature of Bundler: bundle open

What does open do? It opens a bundled gem in your editor. Simple as that.

Why is that awesome? Because it is now easier than ever to go code spelunking inside your project’s dependencies.

Would it just be easier to throw a binding.pry right inside Mongoid’s call chain? (Pro tip: yes, yes it would)

bundle open mongoid

In a perfect world, third party libraries that our projects depend upon would be like little black boxes that Just Work™ as advertised. In real life, we often need to rip open those black boxes and tinker with their innards.

bundle open reduces the friction of diving into my dependencies, which means I do it sooner and more often.