[Rubygems-developers] Thoughts on handling bin and man files
chad at chadfowler.com
Thu Mar 18 21:22:56 EST 2004
On Mar 18, 2004, at 8:09 PM, Jim Weirich wrote:
> 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
Good point. With something like Rake, which you would expect to run
frequently, this would definitely be inconvenient.
> 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.
Not a bad idea at all.
> 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.
The version problem has prevented me from suggesting several other
alternatives as they've come to me. I toyed with the idea of having a
bin directory for each Gem (as we've discussed previously) and then
creating a utility to modify your PATH. It would be too cumbersome,
> 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
Yea, we really need to be cross-platform.
I haven't previously seen stow, but I'm reading about it now. Very
similar problem that they've solved!
More information about the Rubygems-developers