Ray*_* A. 12 ruby gem ruby-on-rails
我正在进行捆绑安装,所有的Gems工作正常,除了JSON,当它到达JSON gem我收到此错误.
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.
Run Code Online (Sandbox Code Playgroud)
有什么可能导致这个错误的想法吗?
knu*_*nut 16
您正在使用Windows,因此RubyInstaller开发工具包可以帮助您:http://rubyinstaller.org/add-ons/devkit/
devkit安装了一个C编译器(以及其他一些东西)来编译C编写的部分.
安装它并再次尝试安装gem - 也许有选项--platform=ruby.
有关详细信息,请访问https://github.com/oneclick/rubyinstaller/wiki/Development-Kit