Wednesday, June 24, 2015

An error occurred while installing json (1.6.1), and Bundler cannot continue.

Make sure that `gem install json -v '1.6.1'` succeeds before bundling.
zepho-mac-pro:dynamic-menus zepho$ gem install json -v 1.6.1
Building native extensions.  This could take a while...
ERROR:  Error installing json:
ERROR: Failed to build gem native extension.

    /Users/zepho/.rvm/rubies/ruby-2.2.2/bin/ruby -r ./siteconf20150624-48402-1w7o7yz.rb extconf.rb
checking for ruby/re.h... yes
checking for ruby/encoding.h... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling generator.c
generator.c:952:47: error: too few arguments provided to function-like macro invocation
    VALUE result = rb_str_new(FBUFFER_PAIR(fb));
generator.c:952:11: warning: incompatible pointer to integer conversion initializing 'VALUE' (aka 'unsigned long') with an expression of type 'VALUE (const char *, long)';
    VALUE result = rb_str_new(FBUFFER_PAIR(fb));
          ^        ~~~~~~~~~~
1 warning and 1 error generated.
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/zepho/.rvm/gems/ruby-2.2.2@dmenu/gems/json-1.6.1 for inspection.
Results logged to /Users/zepho/.rvm/gems/ruby-2.2.2@dmenu/extensions/x86_64-darwin-11/2.2.0/json-1.6.1/gem_make.out

Resolution: Downgrade ruby from 2.2.2 to 2.1