From: Austin Ziegler Date: 2006-06-16T02:53:08+09:00 Subject: Re: running applications installed from gems On 6/15/06, John Gabriele wrote: > > [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. 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. -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca