GEM安装json-v1.7.3:'Please update your PATH to include build tools',如何解决?

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (2)
  • 关注 (0)
  • 查看 (16)

运行时:

rails new blog

我得到:

Installing json (1.7.3)
Gem::InstallError: 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' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
An error occurred while installing json (1.7.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.3'` succeeds before bundling.

运行:

gem install json -v 1.7.3

我得到:

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'

我在使用Windows 8。我确实有c:\ruby193\bin在我的路上。我该如何纠正这些错误?

提问于
用户回答回答于
用户回答回答于

当你运行ruby dk.rb init你犯了这样的错误

必须更改命令提示符窗口的编码。chcp 1256您将收到以下消息:活动代码页:1256

现在,您可以运行该命令,而不存在任何问题。

扫码关注云+社区