我正在尝试使用 ruby 2.2.3 安装 json gem(我尝试过其他版本),但我总是遇到相同的错误:
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 …Run Code Online (Sandbox Code Playgroud)