From: Mathieu Blondel Date: 2007-10-31T06:22:48+09:00 Subject: Re: clarification of ruby libraries installation paths? Austin Ziegler wrote: > There are no third-party libraries installed in /usr/lib/ruby/1.8. > Those are in /usr/lib/ruby/site_ruby/1.8 for anyone using setup.rb. > That's been this way as far as I can remember (and I've been using > Ruby since 1.6). > Here's my understanding of the problem. When you run "ruby setup.rb --help", you get: [...] --prefix=path path prefix of target environment [$default_prefix] [...] --siteruby=path the directory for version-independent aux ruby libraries [$default_siteruby] --siterubyver=path the directory for aux ruby libraries [$default_siteruby/$version] [...] $default_prefix comes from Config::CONFIG['prefix'] (--prefix option of Ruby's configure) $default_siteruby comes from Config::CONFIG['sitedir'] (--with-sitedir option of Ruby's configure) Distros probably configure Ruby with --prefix=/usr. The default value of --with-sitedir in Ruby's configure is PREFIX/lib/ruby/site_ruby. With --with-sitedir left as is, a third-party lib installed manually would thus end up in /usr/lib/ruby/site_ruby. This is clearly unwanted. Therefore, distros configure Ruby with --with-sitedir='/usr/local/lib/site_ruby'. Since, /usr/local/lib/site_ruby is the default value of Config::CONFIG['sitedir'] in distros, all packages for third-party libs must be built with --siteruby explicitly specified: * --siteruby=/usr/lib/ruby/1.8/ for Debian (mixing up with the stdlib) * --siteruby=/usr/lib/ruby/site_ruby/1.8/ for Fedora * --siteruby=/usr/lib/ruby/vendor_ruby/1.8/ for openSUSE The original poster is only asking for an "official statement" from Ruby-core developers (if not Matz): "distros, use this directory as the standard directory for packaged third-party libs". This is simply for the sake of consistency among Linux distributions. Mathieu Blondel