From: Jim Weirich Date: 2004-08-08T08:09:37+09:00 Subject: Re: RubyGems question: Knowing the correct name for add_dependency James Britt wrote: > I'm trying to write a gemspec file. My code depends on Austin Ziegler's > Mime::Types library. I want to call to add_dependency, but I do not > know what to pass as the first argument. The first argument should be the base name of the gem without version or platform information ... E.g. spec = Gem::Specification.new do |s| ... s.add_dependency('rake', ">0.4.0") ... end > There's a gem for the MIME::Types lib; can one use add_dependency even > when there is no gem for the dependency? Ahh, if there is no gem for the library, then you can't list it as an explicit dependency. However, you can document it by including it in the requirements field (which is a list of strings) ... E.g. s.requirements << "Needs Mime::Types library" Perhaps Austin can be persuaded to offer MIME::Types as a gem, our perhaps you could package it yourself. -- -- 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)