我正在尝试为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'
我已经运行了install 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
使用干净的目录重新安装并再次安装。但错误仍然相同。
答案 0 :(得分: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帮助程序脚本。
希望有所帮助。
答案 1 :(得分:1)
我遇到了与ruby dk.rb安装相同的问题,但是,正如--force选项所建议的那样,它已经成功安装了我的devkit,而这反过来解决了我使用JSON 1.4.6 gem的gem安装失败。