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.
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:
opendo? 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.
Need to know which methods CanCan adds to ActionController?
bundle open cancan
Want to toss some debug output inside an ActiveRecord query chain?
bundle open activerecord
Would it just be easier to throw a
binding.pryright 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 openreduces the friction of diving into my dependencies, which means I do it sooner and more often.
And THAT's why it's my favorite feature in Bundle (besides the whole dependency management feature… that's great too).