I am doing a bundle install and all of the gems work fine except JSON when it get to the JSON gem I receive this error.
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.
Any idea on what could be causing this error?
You are working with Windows, so the RubyInstaller Development Kit may help you: http://rubyinstaller.org/add-ons/devkit/
The devkit installs a C-compiler (and some other stuff) to compile C-written parts.
Install it and try again to install the gem - perhaps with option --platform=ruby
.
Details can be found at https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
That's because this gem using a piece of code written on C. For working properly you need c compiler installed on your machine. As a way, try to use json_pure written on pure Ruby
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With