1

我读了一个答案gem fetch,这个问题的答案is-it-possible-to-download-a-ruby-gem-without-installing-it-automatically。但是 windows 我并不总是得到 windows gem。

使用gem install gosu --remote安装windows版本Successfully installed gosu-0.7.15-x86-mswin32-60

使用下载时,gem fetch gosu我得到Downloaded gosu-0.7.15的是 linux 版本,无法安装在我的 windows PC 上。

询问具有gem fetch gosu-0.7.15-x86-mswin32-60类似尝试的特定宝石会产生ERROR: Could not find gosu-0.7.15-x86-mswin32-60 in any repository

关于在使用 fetch 与 install 时如何为我的 PC 获取正确版本的任何想法?

4

1 回答 1

4
$ gem fetch --help
Usage: gem fetch GEMNAME [GEMNAME ...] [options]

  Options:
    -v, --version VERSION            Specify version of gem to fetch
        --platform PLATFORM          Specify the platform of gem to fetch

  Local/Remote Options:
    -B, --bulk-threshold COUNT       Threshold for switching to bulk
                                     synchronization (default 1000)
    -p, --[no-]http-proxy [URL]      Use HTTP proxy for remote operations
        --source URL                 Use URL as the remote source for gems

  Common Options:
    -h, --help                       Get help on this command
    -V, --[no-]verbose               Set the verbose level of output
    -q, --quiet                      Silence commands
        --config-file FILE           Use this config file instead of default
        --backtrace                  Show stack backtrace on errors
        --debug                      Turn on Ruby debugging


  Arguments:
    GEMNAME       name of gem to download

  Summary:
    Download a gem and place it in the current directory

  Defaults:
    --version '>= 0'

你应该能够做到

$ gem fetch gosu --platform x86-mswin32

或者干脆去下载页面

于 2009-12-02T15:37:16.780 回答