From: Justin Hahn Date: 2007-11-10T02:48:36+09:00 Subject: Automating gem installs? I'm trying to setup an automated build system for all of our upstream binary dependencies (that we don't get from our OS). Since we track a newer ruby than most of our machines ship with, this means building ruby and installing gems. For the most part this works fine, except when I need to install a gem like mongrel that has several versions. For example, if I run 'gem install -y mongrel' from my Makefile, I get an error like this (since stdin isn't attached): Select which gem to install for your platform (x86_64-linux) 1. mongrel 1.1 (ruby) 2. mongrel 1.1 (mswin32) 3. mongrel 1.0.4 (mswin32) 4. mongrel 1.0.4 (ruby) 5. Skip this gem 6. Cancel installation > ERROR: While executing gem ... (NoMethodError) undefined method `strip' for nil:NilClass Unfortunately, the list entries aren't even stable -- sometimes option #1 is the mswin32 and sometimes it's the ruby choice. So I can't even do something nasty like "echo 1 | gem install -y mongrel" and be assured of getting the right thing. Is there any way to tell gem, from the commandline, precisely which gem I want? The documentation seems sparse, and I haven't had the time to go digging through gem's source code yet. (My hope is that this is any easy answer...) -- Posted via http://www.ruby-forum.com/.