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