Forum: Ruby how to get some gem source code?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ffd881829651935d986c52d12279befb?d=identicon&s=25 Zhenning Guan (rubyernewbie)
on 2008-11-04 11:30
I gem install someone so can use the someone, but how I read the someone
source code?
F52a217f68b0d4db49ce2ceb06f79691?d=identicon&s=25 Alex Fenton (Guest)
on 2008-11-04 12:50
(Received via mailing list)
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
This topic is locked and can not be replied to.