我读到一个答案 gem fetch 回答这个问题 是否可以在不自动安装的情况下下载 ruby​​-gem. 。但 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电脑上。

询问具体的宝石 gem fetch gosu-0.7.15-x86-mswin32-60 和类似的尝试产量 ERROR: Could not find gosu-0.7.15-x86-mswin32-60 in any repository

关于在使用获取和安装时如何为我的电脑获取正确的版本有什么想法吗?

有帮助吗?

解决方案

$ 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

或者干脆去href="http://code.google.com/p/gosu/downloads/list" rel="nofollow noreferrer">下载页面的

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top