From: Richard Kilmer Date: 2003-12-25T04:25:26+09:00 Subject: Re: RubyGems and dependencies On Dec 24, 2003, at 11:34 AM, Jim Weirich wrote: > Curt Hibbs wrote: > >> This is too simple. RubyGems should also check that the proper >> version is >> installed. >> I think that RubyGems should optionally allow the user to inform it >> of a >> manual installation when a gem is not found, prompting the user for >> the need >> information (like version number installed). That particular gem >> would then >> be entered into its gem-database as having been installed manually for >> future use. >> Correspondingly, there should be an option to remove such a >> manual-installation-entry from the RubyGems database. > > I was thinking along these same lines. Well, when we were discussing this at RubyConf03 we decided that Gems would run along side the existing mechanisms for installation/management of libraries. In other words, the ruby/lib/1.8 and ruby/lib/site_ruby/1.8 would remain as they are, and if you install a Ruby library with setup.rb or install.rb it would operate just like now. If you install a Gem, however, it installs in a separate directory. There is no 'database' per se. There is a directory of .gemspec YAML files that are checked and that forms your database of installed Gems (of course, it supports multiple directories). Chad and I have discussed getting all the standard libraries and forming a Gem or set of Gems with them. I think that would be quite cool, but, again, we are not trying to replace the current LOAD_PATH, just augment it to make management of libraries easier and more powerful. Gems supports versioning, the standard library system does not. I mean, as a short term solution we could create a Gem that picks up the Ruby version and you just do: require_gem 'ruby', '> 1.8' or something...of course that .gemspec would not actually modify the LOAD_PATH as other Gems do, because Ruby's libraries are already in the LOAD_PATH. If you then place a dependency on ruby 1.8 (or 1.8.1, etc) you would be guaranteed to have REXML, WEBrick, XMLRPC4R, etc. Hm...now that I think of it, that is pretty sweet. If folks thinks this is good, it could be done quite quickly. -rich > > -- > -- Jim Weirich jweirich@one.net http://onestepback.org > ----------------------------------------------------------------- > "Beware of bugs in the above code; I have only proved it correct, > not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) > > >