3

我正在尝试为 vim 的 CommandT 插件安装用于 ruby​​ 的开发工具包,但我遇到了

C:\Users\Administrator>gem install rdiscount --platform=ruby
ERROR:  Error installing rdiscount:
        The 'rdiscount' native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'

我已经运行了安装 devkit,如下所示

C:\devkit>ruby dk.rb init
[INFO] found RubyInstaller v1.9.3 at C:/Ruby193

Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.

C:\devkit>ruby dk.rb review
Based upon the settings in the 'config.yml' file generated
from running 'ruby dk.rb init' and any of your customizations,
DevKit functionality will be injected into the following Rubies
when you run 'ruby dk.rb install'.

C:/Ruby193

C:\devkit>ruby dk.rb install
[INFO] RubyGems override already in place for C:/Ruby193, skipping.
[WARN] DevKit helper library already exists for C:/Ruby193, skipping.

可能出了什么问题?

编辑:我试过

c:\devkit>ruby dk.rb install --force

Configures an MSYS/MinGW based Development Kit (DevKit) for
each of the Ruby installations on your Windows system. The
DevKit enables you to build many of the available native
C-based RubyGems that don't yet have a binary gem.

Usage: ruby dk.rb COMMAND

where COMMAND is one of:

  init     prepare DevKit for installation
  review   review DevKit install plan
  install  install required DevKit executables

卸载并使用干净的目录再次安装。但错误仍然是一样的。

4

2 回答 2

9

在这行:

C:\devkit>ruby dk.rb install
[INFO] RubyGems override already in place for C:/Ruby193, skipping.
[WARN] DevKit helper library already exists for C:/Ruby193, skipping.

它告诉你它没有安装 DevKit for Ruby,因为它已经有一个以前注册的 DevKit。

您可能重新定位了之前安装的 DevKit,在这种情况下,您需要执行ruby dk.rb install --force覆盖它之前跳过的 RubyGems 和 DevKit 帮助程序脚本。

希望有帮助。

于 2012-06-02T14:21:22.327 回答
1

我在安装 ruby​​ dk.rb 时遇到了同样的问题,但是,正如 --force 选项所建议的那样,它已成功安装了我的 devkit,这反过来又解决了我在使用 JSON 1.4.6 gem 时遇到的 gem 安装失败。

于 2012-11-15T07:34:52.067 回答