[Mongrel] Gem install from script
Wayne E. Seguin
wayneeseguin at gmail.com
Thu Feb 15 22:03:29 EST 2007
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:
or here: (where I get my releases from, I hope it's the "correct" one :)
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
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
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
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?
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?
> Date: Wed, 14 Feb 2007 20:27:16 -0500
> From: "Wayne E. Seguin" <wayneeseguin at gmail.com >
> Subject: Re: [Mongrel] Gem install from script
> To: mongrel-users at rubyforge.org
> Message-ID: < 2203438B-685E-4841-B564-FCA20A5DB025 at gmail.com>
> 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)
> 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 at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/mongrel-users
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
More information about the Mongrel-users