From: Jim Weirich Date: 2004-06-25T01:00:11+09:00 Subject: Re: rubygems thoughts Hans Fugal said: > I just discovered rubygems[1], and it looks neat and promising. Thanks! I have a > few reservations about it, though. [...] > > First: > require 'rubygems' > require_gem 'progressbar' > Right there you're commiting yourself to gem dependencies, which > requires rubygems to be installed anywhere you want your package to go, A two-part response to your question... (1) Gems can be installed with a "stub" in the standard library location. This stub requires rubygems, then requires your package with the proper version, providing a transparent access layer for gems. Stubs are now installed by default (controlled by an option on the gem command line). (2) One of the benefits of rubygems is the ability to specify some version control over what gems get used with your library/application. If you wish to take advantage of version control, then you necessarily become dependent on the gems. We are still evolving the "Best Practices" for gems, but I suspect that a lot of projects will collect their "require_gems" in one area for better version control. (I don't want to say I want version ">= 2.1" in more than one place!) So I suspect require_gem with version specs to become centralized and normal requires to continue to appear in whatever file needs them. Once the version control is centralized, it is easy to make it optional. For example, just bury the require_gems in a rescue block and if it fails, continue normally. > Point two, for gems to be really useful pretty much all the common > libraries at least need to be gems. That's normal, and what I'd call > critical mass for a packaging system. We are working on it! I'll say it again, if someone needs help packaging their library as a gem, feel free to drop me a line at jim@weirichhouse.org. Or post on the rubygems developement list (on RubyForge). > If gems is successful, it will > grow quickly, perhaps even exponentially. Sending them by email to an > individual is going to quickly become a bottleneck in that case. So > there needs to be an upload system, preferably with gpg signing. For now, if you create a project on RubyForge and upload a GEM file, the gem will automatically be served by the rubyforge gemserver. Use gem -Rl to get a list of gems. > So there are my thoughts, for what they're worth. Enjoy! :-) Thanks for the feedback. -- -- Jim Weirich jim@weirichhouse.org 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)