If you want to take a look at the source code of a gem installed with Bundler inside your Rails project, you can type something like this in your terminal:

valakirka@multivac :~$ bundle show <your-gem> | xargs <editor>

I'm on MacOS X and use TextMate as my main code editor, so to explore the code of Devise (for example) this works like a charm for me:

valakirka@multivac :~$ bundle show devise | xargs mate

And yes, I love oneliners :)