How to get some gem source code?

I gem install someone so can use the someone, but how I read the someone
source code?

···

--
Posted via http://www.ruby-forum.com/.

Zhenning Guan wrote:

I gem install someone so can use the someone, but how I read the someone
source code?

The simplest way is just to look at the installed lib files. Look in ruby/lib/gems/1.8/gems/name_of_gem/lib. Where exactly your ruby/lib directory is will depend on your OS, but maybe something like C:/ruby/lib on Windows, or /usr/lib, /usr/local/lib or /opt/lib on Unix-ish systems.

Most gem-based software is open-source, so you should be able to find the code on wherever the project is hosted. Find out the project's homepage (often on Rubyforge) and go to 'Files' or 'Download'. Good projects will offer their code as a zip or .tar.gz download.

A .gem file is just a .zip file, so you can also unzip it and look inside for the source code.

a