[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

how to get some gem source code?

Zhenning Guan

11/4/2008 10:29:00 AM

I gem install someone so can use the someone, but how I read the someone
source code?
--
Posted via http://www.ruby-....

1 Answer

Alex Fenton

11/4/2008 11:49:00 AM

0

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