lib/ruby/site_ruby vs lib/ruby/vendor_ruby

S

Sniper Abandon

What is the difference between "lib/ruby/site_ruby" vs
"lib/ruby/vendor_ruby"
i thing, RubyVM load both libraries (site_ruby and vendor_ruby)
if yes then , why are they named separately ?



Regards

Thaniyarasu
Castlerock Research
 
Q

Quintus

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 06.12.2010 08:50, schrieb Sniper Abandon:
What is the difference between "lib/ruby/site_ruby" vs
"lib/ruby/vendor_ruby"
i thing, RubyVM load both libraries (site_ruby and vendor_ruby)
if yes then , why are they named separately ?



Regards

Thaniyarasu
Castlerock Research

If you compile and install a C extension without packaging it to a gem,
it goes to site_ruby/ I believe. The vendor_ruby/ directory probably is
for packagers, i.e. persons who provide a Ruby with some extra additions?

Just some thoughts, I don't know for sure.

Vale,
Marvin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJM/RQIAAoJEGrS0YjAWTKV94kH/3aYmGgulC3ntw5ROFq6p15B
+bdiC7Z3mVObQkKo/SLRC7UrzdXYzkppaNomWqs8QuaOH7sERT4l+leTvKx8qJx0
fb2uliNZThK8RBXqmMWvUCTmkzf/3/MCWs6AQ2d/e1ofwjl2J92ip53xaA4VsxxS
2KFNWF9A0y2P+H8jv7KES3aYnZL0We6SojXUKkgJiqTtVDGLuhPMbAjdQ5cB3w+P
y0KwKvFpHElVFcrw7OT7v1UAkL15D74IVQfV9tgMDVjigb1e5UYWl1qXgPbPdixc
lmwOt1wRat3oFgm6D876R/4jkaH80BgTENA2Lz5ap3621GHCWTsZpAV6R9pu6Sg=
=E29U
-----END PGP SIGNATURE-----
 
A

Ammar Ali

What is the difference between =C2=A0"lib/ruby/site_ruby" vs
"lib/ruby/vendor_ruby"
i thing, RubyVM load both libraries (site_ruby and vendor_ruby)
if yes then , why are they named separately ?

The theory is, things you or your admin installs go into site_ruby, as
they are specific to the site (machine, server, etc.) Things installed
by the distribution (for example MRI, jruby, etc.) go into
vendor_ruby, they are specific to that distribution vendor. There are
also architecture specific directories under each, for example
site_ruby/1.9.1/i686-linux or vendor_ruby/1.9.1/i386-darwin, that
contain modules specific to that machine's architecture.

If you look at the contents of the default load paths (p $:) you'll
notice that the site directories come before the vendor directories,
allowing you to "override" certain vendor modules with ones you
install, in site.

BTW, this is not specific to ruby. perl, python, php, and others have
a similar arrangement.

Regards,
Ammar
 

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,786
Messages
2,569,626
Members
45,328
Latest member
66Teonna9

Latest Threads

Top