5

I'm trying to install json gem using ruby 2.2.3 (I've tried with other oversions), and I always get the same error:

Fetching: json-1.8.1.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing json:
    ERROR: Failed to build gem native extension.

    /home/michell/.rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20160425-25421-vzm9hx.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 [enabled by default]
 VALUE result = rb_str_new(FBUFFER_PAIR(fb));
                ^
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/michell/.rvm/gems/ruby-2.2.0/gems/json-1.8.1 for inspection.
Results logged to /home/michell/.rvm/gems/ruby-2.2.0/extensions/x86_64-linux/2.2.0/json-1.8.1/gem_make.out
  • I'm getting this same error, trying to install all the stuff for Github Pages – TKoL Oct 16 '16 at 9:47
  • I got the same error with ruby-2.3.0, so tried ruby-2.2.0 w/o any changes and it worked. When I see things like above "make'' error I guess I am dealing with a bug. – rtfminc Oct 20 '16 at 2:32
5

I keep forgetting but this should work

bundle update
bundle install

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.