Update json to fix "bundle install" failure in Ruby 2.2

In Ruby 2.2, bundle install fails because the json gem doesn't build:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /home/wayne/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20150524-7855-al803k.rb extconf.rb 
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling generator.c
In file included from generator.c:1:0:
../fbuffer/fbuffer.h: In function ‘fbuffer_to_s’:
../fbuffer/fbuffer.h:175:47: error: macro "rb_str_new" requires 2 arguments, but only 1 given
     VALUE result = rb_str_new(FBUFFER_PAIR(fb));
                                               ^
../fbuffer/fbuffer.h:175:20: warning: initialization makes integer from pointer without a cast
     VALUE result = rb_str_new(FBUFFER_PAIR(fb));
                    ^
Makefile:237: recipe for target 'generator.o' failed
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/wayne/.rvm/gems/ruby-2.2.1/gems/json-1.8.0 for inspection.
Results logged to /home/wayne/.rvm/gems/ruby-2.2.1/extensions/x86_64-linux/2.2.0/json-1.8.0/gem_make.out
An error occurred while installing json (1.8.0), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.0'` succeeds before bundling.

發現下載檔案然後bundle出現問題,bundle update也無法,然後找到解法,是因為gemfile.lock作祟! 詳細解法請見,貌似do not commit their Gemfile.lock to source control and have it listed in their .gitignore. https://github.com/estately/rets/pull/110
Previous
Next Post »