Graham, My understanding is that rubygems (gem) simply pulls a list of available gems fitting the described project from rubyforge (or the supplied source url). Both *nix and Windows gems are released here and hence they are showing up on the prompt.
You can see this here: http://rubyforge.org/frs/?group_id=1306&release_id=9190 or here: (where I get my releases from, I hope it's the "correct" one :) http://mongrel.rubyforge.org/releases/gems/ I do agree that it *should* detect the platform if it can and have a mechanism for choosing based on that. I don't believe that they've come to an agreement on the best way to do this, however you should research this issue yourself as I'm not completely familiar with the discussion track. Here's another option: Use either "curl -O" or "wget" to download a specific mongrel gem, then install it (Mac OS X comes with curl, Linux comes with one or the other or both based on the distro). > wget http://mongrel.rubyforge.org/releases/gems/mongrel-1.0.1.gem > gem install mongrel-1.0.1.gem (Note: If this isn't being run as root, put a sudo in front of the gem install) I prefer this method for dynamic systems as I can specify the version in installation / setup scripts and not have to worry about using the echo or other such tricks and it going awry. Anther benefit is that you can serve the gems yourself internally so that you monitor which ones get "released" to your systems and check / test the code before pushing a new version. Of course it has a downside, you have to manually update when new versions come out. That said, shouldn't we be monitoring these and evaluating whether or not upgrades should occur based on the changelogs and personal testing etc...? So... it should not be much of an issue, especially considering you were basically attempting this to begin with ;) Ok... I'm rambling. Does this method help to accomplish your goals? ~Wayne On Feb 15, 2007, at 18:44 , Graham Miller wrote: > Thanks, Wayne, but you're right, that seems a little brittle. Is > there any other way to do this? I guess one question is that if it > knows that I'm on an "i486-linux" platform, why is it giving me the > "mswin32" option in the first place? > > graham > > > > Date: Wed, 14 Feb 2007 20:27:16 -0500 > From: "Wayne E. Seguin" <[EMAIL PROTECTED] > > Subject: Re: [Mongrel] Gem install from script > To: mongrel-users@rubyforge.org > Message-ID: < [EMAIL PROTECTED]> > Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed > > One possible method is: > > echo 1 | gem install mongrel > > The downside to this is if it's not always the first one (eg if ruby/ > win32 can get switched at each next release) > > ~Wayne > > On Feb 14, 2007, at 19:16 , Graham Miller wrote: > > > Hello all, > > Apologies if this is not the right place for this question, but I > > thought I'd start here. We're trying to install the latest Mongrel > > from inside a script. Using 'gem install -v 1.0.1 mongrel' causes > > a prompt to come up asking whether to install the "ruby" or > > "mswin32" variant. > > > > Select which gem to install for your platform (i486-linux) > > 1. mongrel 1.0.1 (ruby) > > 2. mongrel 1.0.1 (mswin32) > > 3. Cancel installation > > > > > > > If I don't want to have to write an expect script or something like > > that, is there any way to specify on the command line that I want > > the "ruby" variant so that I don't get this prompt? > > > > Thanks in advance for any help. > > > > graham > > > > > > -- > > Marketcetera Trading Platform > > download.run.trade . > > www.marketcetera.org > > ______________________________ > _________________ > > Mongrel-users mailing list > > Mongrel-users@rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > _______________________________________________ > Mongrel-users mailing list > Mongrel-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users _______________________________________________ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users