Ruby on rails 在ubuntu、ruby 2.2.0中安装gem json时出错
当我给bundle安装时,我得到了错误“确保gem安装json-v1.8.3成功” 当我发出以下命令时,出现错误: gem安装json-v1.8.1Ruby on rails 在ubuntu、ruby 2.2.0中安装gem json时出错,ruby-on-rails,ruby,json,Ruby On Rails,Ruby,Json,当我给bundle安装时,我得到了错误“确保gem安装json-v1.8.3成功” 当我发出以下命令时,出现错误: gem安装json-v1.8.1 Building native extensions. This could take a while... ERROR: Error installing json: ERROR: Failed to build gem native extension. /home/ubuntu/.rvm/rubies/ruby-2.2.
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/home/ubuntu/.rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20150908-17724-4ovxaa.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/ubuntu/.rvm/gems/ruby-2.2.0/gems/json-1.8.1 for inspection.
Results logged to /home/ubuntu/.rvm/gems/ruby-2.2.0/extensions/x86_64-linux/2.2.0/json-1.8.1/gem_make.out
请有人帮我解决这个问题。我将非常感激