[Rubygems-developers] Thoughts on handling bin and man files

Jamis Buck jgb3 at email.byu.edu
Thu Mar 18 06:12:29 EST 2004

Chad Fowler wrote:
> We have a --dir switch right now, along with the $GEM_PATH environment 
> variable.  I'm not sure whether --user and --system are needed in that 
> case.  It might be better to let people manage what that would mean to 
> them separately?

I agree.  If you put to many options on 'gem', it just makes it harder 
for the average user to learn how to use it.  If the dir switch exists, 
and the $RUBY_GEMS environment variable can allow users to specify which 
paths to search for gems, then I think that functionality is sufficient.

>> BTW, "running" a gem file as you suggest doesn't appeal to me because
>> I don't know whether the installation of the gem will be temporary or
>> permanent.  It sounds temporary (since you're not actually asking gem
>> to install it), but would you *really* uninstall it after running?
> We might want to forget about my potentially very flawed 
> one-man-email-brainstorming session.  Is it "running" the gem that isn't 
> appealing to you or the implementation I suggested?  It sounds like it's 
> my suggested implementation that you don't like.  I think the simple 
> solution is to decide that you have to install a gem before you can 
> "run" it.  I think it's a decent compromise.  Perhaps, then the following:
> gem --run mygem-0.1.1.gem
> ...would first ask you if you would like to invoke the installer.  If 
> you say "no", you can't run the gem.  If you say "yes", it installs and 
> then runs it.

I, for one, *really* liked the idea of just running it on-the-fly, 
without having to install it.  I don't mind it prompting to install, but 
if the user says "no" I think it would be slick to extract it to some 
temporary directory, run the gem, and then delete it.

It would be even cooler if you could do some kind of "remote-run", which 
would download the gem first (if it isn't found locally) and then run it.

Jamis Buck
jgb3 at email.byu.edu

ruby -h | ruby -e 
'a=[];readlines.join.scan(/-(.)\[e|Kk(\S*)|le.l(..)e|#!(\S*)/) {|r| a << 
r.compact.first };puts "\n>#{a.join(%q/ /)}<\n\n"'

More information about the Rubygems-developers mailing list