From: John Gabriele Date: 2006-06-16T03:40:20+09:00 Subject: Re: running applications installed from gems On 6/15/06, Austin Ziegler wrote: > [snip] > The one in /opt/ruby-1.8.4/bin is the RubyGems stub. That's in your > $PATH, because that's where your ruby executable is. The one in > ...gems/pdf-writer-1.1.3/bin/techbook is my actual executable. The > RubyGems stub will activate the PDF::Writer 1.1.3 gem (actually, the > latest unless you select a specific version) and then "run" the one in > the gems/... path, which is *not* in your $PATH. Ah... I see. Thanks Austin. I'd forgotten that RubyGems allows multiple versions of the same gem to be installed. But since the exectuable stub is in a common directory, there's gotta be some way for *it* to decide which version of the given gem to actually run. So, I guess the convention then -- for when you want to supply an executable with a gem -- is to tell the GemSpec you want a stub which calls "load 'foo'". When that foo file is loaded, your app should run. In the case of pdf-writer, both the stub and the module you load to actually run the program happen to have the same name. Further, I see that both .../lib/ruby/gems/1.8/gems/pdf-writer-1.1.3/bin and .../lib/ruby/gems/1.8/gems/pdf-writer-1.1.3/lib directories are in $: when that "load 'techbook'" call is made from the stub. Chapter 7 of the RubyGems user's guide (http://docs.rubygems.org/read/chapter/5) doesn't have much, but refers the reader to the DeveloperGuide, but I don't see a link to that on the main RubyGems page. I hopped over to my .../lib/ruby/site_ruby/1.8 directory, ran rdoc, and had a look in the resulting lovely html, but didn't see a dev guide in there either. Where can I find this developer's guide?