From: John Gabriele Date: 2006-06-16T02:15:01+09:00 Subject: Re: running applications installed from gems On 6/15/06, Austin Ziegler wrote: > On 6/15/06, Mark Volkmann wrote: > > On 6/15/06, Austin Ziegler wrote: > > > On 6/15/06, Mark Volkmann wrote: > > > [snip] > > Sorry to be dense about this, but *how* does the user run the application? > > > > I think what you're suggesting is that the user > > 1) runs "gem install app-name" > > 2) navigates to the bin directory of the gem > > 3) runs a script found there > > No. > > [snip] > > % gem install pdf-writer > % techbook > > [snip] > What Austin is implying is that after you run the gem command (usually as root, from any directory), the, say, techbook executable will then be in your bin directory (for me it's /opt/ruby-1.8.4/bin). As long as that bin directory is in a user's $PATH, that user can then run the techbook program from any directory just by typing "techbook" at the prompt. It's interesting to note that there's two versions of a "techbook" file on my system: $ ls -l /opt/ruby-1.8.4/lib/ruby/gems/1.8/gems/pdf-writer-1.1.3/bin/techbook /opt/ruby-1.8.4/bin/techbook -rwxr-xr-x 1 root root 419 2006-06-15 12:39 /opt/ruby-1.8.4/bin/techbook -rw-r--r-- 1 root root 594 2006-06-15 12:39 /opt/ruby-1.8.4/lib/ruby/gems/1.8/gems/pdf-writer-1.1.3/bin/techbook I don't know enough about gems to say: * what the /opt/ruby-1.8.4/bin/techbook executable was generated from, or * what the gems/pdf-writer-1.1.3/bin/techbook file is for. I don't see anything in the RubyGems faq or the RubyGems manual about generating executables in gems. The GemSpec reference briefly mentions executables and the bindir, but I don't see anything about why you might have two, or one generated from another... ---John