gem install json -v 1.7.3给出'请更新你的PATH以包含构建工具'

Joe*_*Joe 70 json build-tools ruby-on-rails-3 windows-8

当我跑:

rails new blog
Run Code Online (Sandbox Code Playgroud)

我明白了:

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.
Run Code Online (Sandbox Code Playgroud)

当我跑:

gem install json -v 1.7.3
Run Code Online (Sandbox Code Playgroud)

我明白了:

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'
Run Code Online (Sandbox Code Playgroud)

我正在使用Windows 8.我的确c:\ruby193\bin在我的道路上.我该怎么做才能解决这些错误?

Jul*_*let 205

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

安装DevKit

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

DevKit url此时用于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

按照这里的说明.

或简短说明:

解压缩拉链

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

ruby dk.rb init

ruby dk.rb安装

gem install rdiscount --platform = ruby

  • 我有同样的问题,谢谢你的回答.+1 (8认同)
  • +1链接`git clone git:// github.com/oneclick/ruby​​installer.git``cd ruby​​installer``rake devkit sfx = 1`为我工作 (3认同)
  • 适用于Windows 8.1 (3认同)
  • 这个``gem install rdiscount --platform = ruby​​``救了我的屁股.谢谢! (2认同)