我正在做一个软件包安装,所有的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/
http://rubyinstaller.org/add-ons/devkit/
devkit安装C编译器(和其他一些东西)来编译C写入的部分.
安装它,然后重试安装宝石 – 也许使用选项–platform = ruby.
详情请见https://github.com/oneclick/rubyinstaller/wiki/Development-Kit