[Rubygems-developers] Thoughts on handling bin and man files
jim at weirichhouse.org
Thu Mar 18 20:09:28 EST 2004
Chad Fowler wrote:
> application. To me, gem --run can fill that need, though the files will
> end up being extracted. As long as it's transparent, it shouldn't
> matter. You could even do:
> gem --run mygem-0.1.1.gem
> ...and it could extract the gem to a personal directory if it's not
> already installed (either globally or locally) and run transparently.
> That's kind of appealing.
I'm not wild about this option. I'm sure people will not want to type
gem --run rake-0.3.1
every time they want to run rake. Perhaps this can be an option for
stuff you use only occasionally, but we need a way of installing
directly into the user's PATH.
Here's an option I hadn't seen yet. Create a bin directory in the gem
installation area. All the user would need to do is add this directory
to his search path. Since all gem applications would go into this
directory, it would not too onerous on the user.
Perhaps a better idea would be provide an install-app option to gem and
specify the bin directory directly. E.g.
gem --install-app --exec-prefix=/usr/local/bin rake-0.3.1
The default directory could be wherever the ruby command was installed.
Allowing --exec-prefix means a user could install apps into his home
directory. One problem is that this would only support a single version
at a time, even though multiple gems of the library could be install.
Symbolic links aren't a bad idea (on Unix ... not on Windows, alas).
Has anyone looked at how "stow" manages its links. Perhaps we need a
ruby version of stow. (see http://www.gnu.org/software/stow/stow.html)
-- Jim Weirich jim at 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)
More information about the Rubygems-developers