From: Eric Hodel Date: 2007-11-01T07:25:35+09:00 Subject: Re: clarification of ruby libraries installation paths? On Oct 31, 2007, at 03:15 , Jonas Pfenniger wrote: > I think it would help, and not only for debian, if the rubygems team > could split the local package index with the rest of the project. The > running code only needs to know what packages are available or not and > be able to populate the $LOAD_PATH. For this, it is only useful to > locate one (or more) package description indexes. RubyGems already has a feature to deal with this, the GEM_PATH environment variable. You can split up installed gems across any number of directories as you wish. > By checking the write ability of a gemspec, the gem command-line can > then decide if the package is locked (=> maintained by the system > package manager) or not. It could also fallback on a user repository > if the whole index is locked. RubyGems doesn't know anything about packages (ruby libraries installed by something other than RubyGems). If a package wraps `gem install` then RubyGems can't tell the difference between something installed by `gem install` and something installed by the package system. Both will have a read-only .gemspec file. By default RubyGems installs gems into GEM_HOME. If you don't want users touching packaged gems, add a directory other than GEM_HOME to the GEM_PATH, and if users mess with it, blame them for shooting of their own feet. -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars