Gem Editor

Get Version




Gemedit lets you quickly open up the source for a gem in your favorite editor.

Looking through other people’s code is a great way to learn. I often use it when a gem’s RDoc isn’t as helpful as I’d like or just want to see how someone put a library together. Gemedit just makes it easier to get to the code.


$ sudo gem install gemedit

Demonstration of usage

If you want to see how gemedit works just install it and run this:

$ gem edit gemedit

Gemedit tries to use your favorite editor from your $GEMEDITOR, $VISUAL or $EDITOR environment variable. It will fall back to everyone’s favorite editor: vi. You can specify the editor with the -e/--editor switch. Run this to view the source for rake in TextMate:

$ gem edit -e mate rake

And of course, help is available:

$ gem edit -h

$ gem edit --help


There isn’t much more to document than what is on this page, but feel free to browse the RDoc. Or checkout the Rubyforge project page.

Source Repository:

The source is currently on github. You can browse through it at or pull it down and play with it yourself with

$ git clone git://


This code is free to use under the terms of the MIT license.


Comments are welcome. Send an email to Lee Marlow

Lee Marlow, 15th November 2009
Theme extended from Paul Battley