Difference between site_ruby and gems

C

Cali Wildman

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?
 
J

Jano Svitok

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.
 
C

Cali Wildman

Jano said:
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.


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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top