support install non-local gem files

redstun's Avatar


09 Nov, 2010 03:12 AM

I want to be directly install the gem ruby-debug-base for win32, in just one step
gem install

For now I can't, I have do it in 2 steps
1. wget
2. gem install ruby-debug-base-0.10.4-x86-mswin32.gem

BTW, the '--source' option for command 'gem install' is a little confusing, it looks like to accept a remote gem url, but it's not, it's the option to use a third-party gem depot, shouldn't it be renamed? in a backward compatible way of course.


  1. Support Staff 1 Posted by Nick Quaranto on 16 Nov, 2010 01:21 AM

    Nick Quaranto's Avatar

    Yeah, you can't use gem like wget. You could have just done gem install ruby-debug-base.

  2. Nick Quaranto closed this discussion on 16 Nov, 2010 01:21 AM.

  3. redstun re-opened this discussion on 16 Nov, 2010 05:31 AM

  4. 2 Posted by redstun on 16 Nov, 2010 05:31 AM

    redstun's Avatar

    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, I have to get it from another website, i.e., because the win32 version is an nonofficial port.

    That's why I'm asking if gem can be improved to handle this case easier.


  5. Support Staff 3 Posted by Eric Hodel on 16 Nov, 2010 10:01 PM

    Eric Hodel's Avatar

    How to install platform gems where your gem's platform doesn't match the target platform is described in gem help install:

    $ gem install -i ~/tmp/gems --platform mswin32 ruby-debug-base Successfully installed linecache-0.43-x86-mswin32
    Successfully installed ruby-debug-base-0.10.4-x86-mswin32
    2 gems installed
    $ gem env | grep -A2 PLATFORM - RUBYGEMS PLATFORMS:

    - ruby
    - universal-darwin-10
  6. Eric Hodel closed this discussion on 16 Nov, 2010 10:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac