[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Difference between site_ruby and gems

Cali Wildman

6/24/2008 8:34:00 PM

I am trying to understand the difference between site_ruby (Ruby
extensions and libraries) and gems. I read that extensions are generally
meant for more low-level type extensions usually written say in C.
However, in my current setup, I use htree which is deployed as an
extension but AFAIK written entirely in Ruby. Does anyone know why
something like htree shouldn't be deployed as a gems instead?
--
Posted via http://www.ruby-....

2 Answers

Jano Svitok

6/24/2008 10:56:00 PM

0

On Tue, Jun 24, 2008 at 22:34, Cali Wildman
<caliwildman2004-info@yahoo.com> wrote:
> I am trying to understand the difference between site_ruby (Ruby
> extensions and libraries) and gems. I read that extensions are generally

site_ruby is directory for global addons for ruby.
.../lib/ruby/1.8 contains the default libraries
.../lib/ruby/site_ruby/1.8 contains additional libraries - one of them
is rubygems.
.../lib/ruby/gems contains stuff for rubygems library (large part of
that stuff happens to be the installed gems)

site_ruby is a site-wide place (= for all users on that computer) for
additional libraries that is automatically on the search path.

> meant for more low-level type extensions usually written say in C.
> However, in my current setup, I use htree which is deployed as an
> extension but AFAIK written entirely in Ruby. Does anyone know why
> something like htree shouldn't be deployed as a gems instead?

Nobody packaged the lib as a gem yet. You may try yourself, and
eventually send the result to the author/maintainer.
Read the docs for rubygems, pick source for another gem, see how it is
done and imitate. Hoe/echoe gems might be
useful for the conversion - they provide templates etc.

Cali Wildman

6/25/2008 4:56:00 AM

0

Jano Svitok wrote:
> On Tue, Jun 24, 2008 at 22:34, Cali Wildman
> <caliwildman2004-info@yahoo.com> wrote:
>> I am trying to understand the difference between site_ruby (Ruby
>> extensions and libraries) and gems. I read that extensions are generally
>
> site_ruby is directory for global addons for ruby.
> .../lib/ruby/1.8 contains the default libraries
> .../lib/ruby/site_ruby/1.8 contains additional libraries - one of them
> is rubygems.
> .../lib/ruby/gems contains stuff for rubygems library (large part of
> that stuff happens to be the installed gems)
>
> site_ruby is a site-wide place (= for all users on that computer) for
> additional libraries that is automatically on the search path.
>
>> meant for more low-level type extensions usually written say in C.
>> However, in my current setup, I use htree which is deployed as an
>> extension but AFAIK written entirely in Ruby. Does anyone know why
>> something like htree shouldn't be deployed as a gems instead?
>
> Nobody packaged the lib as a gem yet. You may try yourself, and
> eventually send the result to the author/maintainer.
> Read the docs for rubygems, pick source for another gem, see how it is
> done and imitate. Hoe/echoe gems might be
> useful for the conversion - they provide templates etc.

Thanks for the confirmation, I subsequently found out that same thing
after posting the thread. My understanding is that site_ruby is a core
part of Ruby before RubyGems came along. Now there are 2 ways to add
extensions / libraries and it would seem that htree's author never
packaged it as a gem as you said.
--
Posted via http://www.ruby-....