How to open a gem’s source code in Sublime Text 2 using Bundler
Aug 12, 2013
Update: Even easier than the method described below is to set your EDITOR environment variable to subl and use
bundle open devise
This command opens the ‘devise’ gem in Sublime Text 2. I use Bundler to manage gems:
bundle show devise | xargs sub
And as an aside, while researching the bundle open command, I also ran into
bundle console
which opens a Ruby IRB session with all the gems in your bundle loaded. Great if you need a console where you want your gems, but you don’t want to load the Rails app.