tag:help.rubygems.org,2010-01-19:/discussions/suggestions/21-support-install-non-local-gem-filesRubyGems.org: Discussion 2011-04-07T20:59:34Ztag:help.rubygems.org,2010-01-19:Comment/37043372010-11-16T01:21:47Z2010-11-16T01:21:47Zsupport install non-local gem files<div><p>Yeah, you can't use <code>gem</code> like <code>wget</code>. You could have just done <code>gem install ruby-debug-base</code>.</p>
<p><a href="http://rubygems.org/gems/ruby-debug-base">http://rubygems.org/gems/ruby-debug-base</a></p></div>Nick Quarantotag:help.rubygems.org,2010-01-19:Comment/37043372010-11-16T05:31:19Z2010-11-16T05:31:19Zsupport install non-local gem files<div><p>Nick, you're somewhat right, I can use gem install gem-name to install a gem without specifying version and/or platform, most of the time gem command does what I expect, but there are cases when the version and platform must be specified, else I'll get something not what I expected or something doesn't work for me. And ruby-debug-base is a very good example, I'm using Windows, thus need the win32 version of the gem, instead of getting it from rubygems.org, I have to get it from another website, i.e. rubyforge.org, because the win32 version is an nonofficial port.</p>
<p>That's why I'm asking if gem can be improved to handle this case easier.</p>
<p>Thanks<br />
</p></div>redstuntag:help.rubygems.org,2010-01-19:Comment/37043372010-11-16T22:01:42Z2010-11-16T22:01:42Zsupport install non-local gem files<div><p>How to install platform gems where your gem's platform doesn't match the target platform is described in <code>gem help install</code>:</p>
<p>$ gem install -i ~/tmp/gems --platform mswin32 ruby-debug-base
Successfully installed linecache-0.43-x86-mswin32<br />
Successfully installed ruby-debug-base-0.10.4-x86-mswin32<br />
2 gems installed<br />
$ gem env | grep -A2 PLATFORM
- RUBYGEMS PLATFORMS:</p>
<pre><code>- ruby
- universal-darwin-10</code></pre></div>Eric Hodel