2012-06-02 20 views
3

我試圖安裝的Ruby CommandT插件VIM的開發工具包,我擊中嘗試在Windows 7中安裝開發工具包爲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 

卸載並用乾淨的目錄再次進行安裝。但錯誤仍然相同。

回答

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沒有安裝Ruby的的devkit。

您可能會重新定位先前安裝的DevKit,在這種情況下,您需要執行ruby dk.rb install --force以覆蓋之前跳過的RubyGems和DevKit幫助程序腳本。

希望有所幫助。

+0

爲此,我得到'C:\的devkit>紅寶石dk.rb安裝--force 配置每個 您的Windows系統上的Ruby安裝的MSYS/MinGW的基礎開發工具包(的devkit)。 DevKit允許您構建許多可用的本地 基於C的RubyGems,該RubyGems還沒有二進制gem。 用法:紅寶石dk.rb COMMAND 其中command是一個: 初始化準備的devkit安裝 點評的devkit安裝計劃 安裝安裝所需的devkit可執行 ' –

+0

在我看來,你有一箇舊版本RubyInstaller的devkit的,'--force'選項已經存在好幾個月了:https://github.com/oneclick/rubyinstaller/blob/master/resources/devkit/dk.rb.erb#L35-37 –

+0

順便說一句,請包括哪個版本DevKit是否嘗試過安裝。對於Ruby 1.9.3,您需要在RubyInstaller下載頁面中提到的最新版本:http://rubyinstaller.org/downloads –

1

我的問題與紅寶石dk.rb安裝相同,但是,建議使用--force選項,它已經成功安裝了我的開發包,而後者又解決了我用JSON 1.4.6 gem獲得的gem安裝失敗。

相關問題