开发技术学习 »
前端设计 » Gem::InstallError: The 'json' native gem requires installed build tools.
Gem::InstallError: The 'json' native gem requires installed build tools.
ruby安装错误:Gem::InstallError: The 'json' native gem requires installed build tools.
大概意思就是少了json这个工具。
1、在http://rubyinstaller.org 下载需要的ruby版本,因为是exe文件,所以,你可以直接安装。
2、下载devkit文件,然后解压安装,选择自己想要的目录。(这一步的顺序挺重要,否则第4步操作可能会出错)
3、cmd进入windows命令操作,进入devkit的文件夹下,执行下面的操作:
ruby dk.rb init
ruby dk.rb install
4、cmd进入windows命令操作,使用gem install rails来安装。看到“Successfully installed rails-3.1.1”,说明安装成功。
这里特别指出的就是,在第2、3步的devkit没有安装的话,可能会出现“”错误。
ERROR: Error installing gherkin:
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'
根本原因就是缺少DevKit库,解决方案如下,参照的Complete setup guide for Ruby, Cucumber and Watir or Selenium webdriver on Windows:
首先需要下载Win下面的DevKit安装文件DevKit-tdm-32-…….exe,解压后通过命令行进入解压文件,依次运行下列命令行:
ruby dk.rb initruby dk.rb install
这样DevKit就成功安装了!
您可能还会对这些文章感兴趣!
- span与text-indent段落缩进应用(2967 +)
- php+xdebug,xdebug应用,xdebug配置,xdebug是什么(3640 +)
- PHP报错分析(Corrupted encoded data detected in)(3432 +)
- jquery 表单提交注意事项(3415 +)
- php获取中国天气,中国天气插件说明,根据IP获取天气情况(3561 +)
- vue keep-alive添加(1776 +)
- linux,centos下加压、解压tar,gz,bz2,tgz,zip等(3949 +)
- 话说网站改版应该注意的事项,博客改版,网站改版(2657 +)
- centos忘记密码,centos修改root密码(3942 +)
- 细说 PHP 模板引擎(3004 +)