<p>I am trying to install the ibm_db gem so that I can access DB2 from Ruby.  When I try:</p>

<pre><code>sudo gem install ibm_db
</code></pre>

<p>I get the following request for clarification:</p>

<pre>
Select which gem to install for your platform (i486-linux)
 1. ibm_db 0.10.0 (ruby)
 2. ibm_db 0.10.0 (mswin32)
 3. ibm_db 0.9.5 (mswin32)
 4. ibm_db 0.9.5 (ruby)
 5. Skip this gem
 6. Cancel installation
</pre>

<p>I am always going to be installing the linux version (which I assume is the "ruby" version), so is there a way to pick which one I will install straight from the gem install command?</p>

<p>The reason this is a problem is that I need to automate this install via a bash script, so I would like to select that I want the "ruby" version ahead of time.</p>

Try this:
```
```
sudo gem install --platform ruby ibm_db
```
```
Note that you can get help on the install command using:
```
```
gem help install
```
```
UPDATE:
Looks like this option only works for RubyGems 0.9.5 or above.