ruby-on-rails – 无法使用Windows在rails中安装JSON宝石

我正在做一个软件包安装,所有的gems都可以正常工作,除非 JSON得到 JSON宝石我收到这个错误.
Installing json (1.6.1) with native extensions c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:55
    2:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::E
    xtensionBuildError)

            c:/Ruby192/bin/ruby.exe extconf.rb
    checking for re.h... *** extconf.rb Failed ***
    Could not create Makefile due to some reason,probably lack of
    necessary libraries and/or headers.  Check the mkmf.log file for more
    details.  You may need configuration options.

有什么可能导致这个错误的想法?

解决方法

您正在使用Windows,所以RubyInstaller开发工具包可能会帮助您:
http://rubyinstaller.org/add-ons/devkit/

devkit安装C编译器(和其他一些东西)来编译C写入的部分.

安装它,然后重试安装宝石 – 也许使用选项–platform = ruby​​.

详情请见https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

相关文章

validates:conclusion,:presence=>true,:inclusion=>{...
一、redis集群搭建redis3.0以前,提供了Sentinel工具来监控各...
分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣...
上一篇博文 ruby传参之引用类型 里边定义了一个方法名 mo...
一编程与编程语言 什么是编程语言? 能够被计算机所识别的表...
Ruby类和对象Ruby是一种完美的面向对象编程语言。面向对象编...