Failed to install json 1.8.3 in ruby ​​2.2.1

I run bundle install in Ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux] (installed with rvm 1.25.33) and bundler 1.10.6

When it tries to install json 1.8.3, I get the following:

 Installing json 1.8.3 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /home/andrew/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20150905-31357-cgs3dn.rb extconf.rb creating Makefile make "DESTDIR=" clean make "DESTDIR=" compiling generator.c linking shared-object json/ext/generator.so make "DESTDIR=" install ./install -m 0755 generator.so ./.gem.20150905-31357-199esvy/json/ext make: ./install: Command not found make: *** [install-so] Error 127 make install failed, exit code 2 

On the same host, I can install json 1.8.3 in ruby ​​2.1.3.

In another SO question, I see a suggestion to make sure install is available. I get valid output when I do install --help .

What should I do? Why can pearls set in 2.1.3 rather than 2.2.1?

+7
json ruby gem bundler
source share
3 answers

Simple fix. Delete the gem.lock file and run the package. This should rebuild the gemlock file and fix the problem, I was getting the same error when trying to move my development environment from nitrous.io to cloud9. hope this help

copy from migs120 answer https://github.com/flori/json/issues/253

I use macOS sierra, it works fine.

+11
source share

Install the following package in ubuntu

sudo apt-get install libgmp3-dev

For more information https://github.com/flori/json/issues/253

+1
source share

On OSX, do the following

 brew install coreutils 
+1
source share

All Articles