When I run:

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.

When I run:

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'

I'm using Windows 8. I do have c:\ruby193\bin in my path. What do I do to remedy these errors?

推荐答案

Make sure you install the devkit (ticking the checkboxes that will update the path) : You might need to reinstall ruby too.

Install the DevKit

从这里下载开发工具包http://rubyinstaller.org/downloads/

DevKit url at this time For use with Ruby 1.8.7 and 1.9.3: DevKit-tdm-32-4.5.2

用于Ruby 2.0及以上版本(仅限32位版本):

用于Ruby 2.0及以上版本(仅限x64-64位)

按照说明here操作.

或简短说明:

Unzip the zip

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

ruby dk.rb init

ruby dk.rb install

gem安装rdisont--platform=ruby

Json相关问答推荐

从Json响应中为需要每个值的Post请求提取多个值

将数组中的值作为键连接到另一个数组中的值(Jolt)

如何使用PlayWriter循环访问JSON对象

无法从JSON解析ZonedDateTime,但可以使用格式化程序很好地解析

JQ:获取该值的较短语法是什么

将部分数据字节解组到自定义 struct 中

错误解析错误:意外令牌:在我的 .eslintrc.json 文件中.为什么?

取消嵌套数组并将数组名称添加为附加字段

Oracle Apex - 将 JSON 对象分配给变量以返回

使用 SwiftUI 在 API 调用中解码嵌套 JSON 响应时遇到问题

jq搜索特定字符串并输出对应的父值

自定义将 struct 解组为切片映射

如何在 Go 中生成带有排序键的 JSON?

如何找出实际安装了哪个版本的 bower 包?

将带有数据和文件的 JSON 发布到 Web Api - jQuery / MVC

使用 jq,将对象数组转换为具有命名键的对象

如何向从文件中检索的 JSON 数据添加键值?

JSON.parse 返回字符串而不是对象

Sequelize - 如何仅返回数据库结果的 JSON 对象?

严重:找不到媒体类型 = 应用程序/json、类型 = 类 com.jersey.jaxb.Todo、通用类型 = 类 com.jersey.jaxb.Todo 的 MessageBodyWriter