ruby在windows环境下下载安装devkit

转自 百度  -- dk

windows下安装或升级时gem经常会碰到

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的缘故
这就需要下载Devkit包, 当时我在下载ruby的是时候,看到页面 http://rubyforge.org/frs/?group_id=167上有个devkit-3.4.5r3-20091110.7z,最后证明这个包是过时的,不能用的, 一定要从http://rubyinstaller.org/downloads 这下载最新的,如果上面的地址被和谐了,就从 http://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20110712-1620-sfx.exe 这下载。
下载完成后执行这个文件,会解压到这个一个目录。
进入这个目录,这个目录就是 <DEVKIT_INSTALL_DIR>。

> cd <DEVKIT_INSTALL_DIR>
> ruby dk.rb init
#生成config.yml,这里会检查将要添加DevKit支持的Ruby列表,只支持通过RubyInstaller安装的Ruby
#如果这里列出的Ruby与你的要求不符,可以手动修改
> ruby dk.rb review  #检查要添加DevKit支持的Ruby列表是否有误,可以略过
> ruby dk.rb install
[INFO] Updating convenience notice gem override for 'C:/Ruby192'
[INFO] Installing 'C:/Ruby192/lib/ruby/site_ruby/devkit.rb'
检查是否安装成功
> gem install rdiscount --platform=ruby
Fetching: rdiscount-1.6.8.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed rdiscount-1.6.8
1 gem installed
Installing ri documentation for rdiscount-1.6.8...
Installing RDoc documentation for rdiscount-1.6.8...
如果能安装成功,就说明安装成功。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值