小编典典

gem install json -v 1.7.3给出“请更新您的PATH以包括构建工具”

json

当我跑步时:

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。我该如何解决这些错误?


阅读 277

收藏
2020-07-27

共1个答案

小编典典

确保安装了devkit(选中将更新路径的复选框):您可能还需要重新安装ruby。

安装DevKit

从此处下载开发套件http://rubyinstaller.org/downloads/

目前的DevKit网址适用于Ruby 1.8.7和1.9.3:DevKit-
tdm-32-4.5.2

适用于Ruby 2.0及更高版本(仅限32位版本): DevKit-
mingw64-32-4.7.2

适用于Ruby
2.0及更高版本(仅x64-64位DevKit-
mingw64-64-4.7.2

请按照此处的说明进行操作。

或简短说明:

解压缩拉链

打开命令行并转到解压缩的文件夹

Rubydk.rb初始化

Rubydk.rb安装

Ruby安装rdiscount –platform = ruby

2020-07-27