【发布时间】:2011-12-27 09:42:32
【问题描述】:
我的 Windows 7 机器上安装了 ruby 1.9.2p180 (2011-02-18) [i386-mingw32]。现在我尝试使用命令“gem install json”安装 JSON gem,并收到以下错误。
ERROR: Error installing JSON:
The 'json' native gem requires installed build tools.
Please update your PATH to include build tools or download the DevKit
from '[http://rubyinstaller.org/downloads][1]' and follow the instructions
at '[http://github.com/oneclick/rubyinstaller/wiki/Development-Kit][2]'
然后我去下载了 DevKit-4.5.0-20100819-1536-sfx.exe。将其解压缩到 C:\DevKit。然后在命令提示符下,我执行了以下命令。
ruby dk.rb init
执行上述命令后,我验证生成了 config.yaml 并自动添加了我的 ruby 文件夹的路径。这是 config.yaml 文件“-C:/Ruby192”底部的行
ruby dk.rb review
我收到消息说,当您运行“ruby dk.rb install”时,devkit 功能将被注入到 rubies 中
ruby dk.rb install
我收到以下消息。
[INFO] RubyGems override already in place for C:/Ruby192, skipping.
[INFO] Installing C:/Ruby192/lib/ruby/site_ruby/devkit.rb
现在我尝试使用命令 gem install json 再次执行 JSON gem。然后得到了和以前一样的错误信息。
ERROR: Error installing JSON:
The 'json' native gem requires installed build tools.........
我错过了什么吗?
【问题讨论】:
标签: ruby json windows-7 rubygems