无法在Ruby 2.0上安装JSON 1.8.1 gem

时间:2014-11-24 16:53:26

标签: ruby json

我正在尝试设置一个基本的Rails应用程序,但是在安装JSON 1.8.1 gem时出现问题。

我使用Ruby Installer安装了Ruby 2.0,然后安装了Ruby devkit。当它通过安装JSON gem来测试devkit安装时,我得到以下错误。

d:/Ruby200/bin/ruby.exe extconf.rb
creating Makefile

make "DESTDIR="
generating generator-i386-mingw32.def
compiling generator.c
In file included from d:/Ruby200/include/ruby-2.0.0/ruby.h:33:0,
             from ../fbuffer/fbuffer.h:5,
             from generator.c:1:
d:/Ruby200/include/ruby-2.0.0/ruby/ruby.h:125:14: error: size of array 'ruby_check_sizeof_voidp' is negative
In file included from d:/Ruby200/include/ruby-2.0.0/ruby.h:33:0,
             from ../fbuffer/fbuffer.h:5,
             from generator.c:1:
d:/Ruby200/include/ruby-2.0.0/ruby/ruby.h: In function 'rb_float_value':
d:/Ruby200/include/ruby-2.0.0/ruby/ruby.h:826:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
d:/Ruby200/include/ruby-2.0.0/ruby/ruby.h: In function 'rb_num2char_inline':
d:/Ruby200/include/ruby-2.0.0/ruby/ruby.h:1214:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
d:/Ruby200/include/ruby-2.0.0/ruby/ruby.h:1214:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
d:/Ruby200/include/ruby-2.0.0/ruby/ruby.h:1214:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
d:/Ruby200/include/ruby-2.0.0/ruby/ruby.h:1215:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
d:/Ruby200/include/ruby-2.0.0/ruby/ruby.h:1215:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
d:/Ruby200/include/ruby-2.0.0/ruby/ruby.h:1215:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
d:/Ruby200/include/ruby-2.0.0/ruby/ruby.h: In function 'rb_class_of':
d:/Ruby200/include/ruby-2.0.0/ruby/ruby.h:1515:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
d:/Ruby200/include/ruby-2.0.0/ruby/ruby.h: In function 'rb_type':
d:/Ruby200/include/ruby-2.0.0/ruby/ruby.h:1532:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
In file included from generator.c:1:0:
../fbuffer/fbuffer.h: In function 'fbuffer_append_str':
../fbuffer/fbuffer.h:118:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../fbuffer/fbuffer.h:118:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../fbuffer/fbuffer.h:118:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'convert_UTF8_to_JSON_ASCII':
generator.c:129:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:129:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:129:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:130:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:130:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:130:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'convert_UTF8_to_JSON':
generator.c:227:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:227:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:227:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:228:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:228:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:228:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'mHash_to_json':
generator.c:330:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'mArray_to_json':
generator.c:342:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'mFixnum_to_json':
generator.c:352:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'mBignum_to_json':
generator.c:362:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'mFloat_to_json':
generator.c:372:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'mString_to_json':
generator.c:394:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'mTrueClass_to_json':
generator.c:449:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'mFalseClass_to_json':
generator.c:459:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'mNilClass_to_json':
generator.c:469:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_configure':
generator.c:524:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:532:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:532:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:532:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:533:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:533:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:533:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:540:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:540:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:540:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:541:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:541:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:541:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:548:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:548:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:548:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:549:40: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:549:40: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:549:40: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:556:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:556:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:556:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:557:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:557:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:557:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:564:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:564:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:564:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:565:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:565:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:565:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'set_state_ivars':
generator.c:613:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:613:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:613:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:615:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:615:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:615:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_to_h':
generator.c:630:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'generate_json_object':
generator.c:700:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:700:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:700:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'generate_json_array':
generator.c:746:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:746:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:746:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_prepare_buffer':
generator.c:860:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_partial_generate':
generator.c:890:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'isArrayOrObject':
generator.c:902:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:902:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:902:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:903:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:903:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:903:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_generate':
generator.c:920:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_initialize':
generator.c:950:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_init_copy':
generator.c:968:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:969:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_indent':
generator.c:1012:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_indent_set':
generator.c:1024:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1026:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1026:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1026:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1035:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1035:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1035:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_space':
generator.c:1049:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_space_set':
generator.c:1062:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1064:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1064:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1064:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1073:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1073:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1073:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_space_before':
generator.c:1086:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_space_before_set':
generator.c:1098:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1100:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1100:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1100:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1109:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1109:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1109:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_object_nl':
generator.c:1123:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_object_nl_set':
generator.c:1136:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1138:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1138:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1138:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1146:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1146:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1146:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_array_nl':
generator.c:1159:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_array_nl_set':
generator.c:1171:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1173:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1173:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1173:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1181:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1181:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1181:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_check_circular_p':
generator.c:1196:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_max_nesting':
generator.c:1208:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_max_nesting_set':
generator.c:1220:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_allow_nan_p':
generator.c:1233:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_ascii_only_p':
generator.c:1245:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_quirks_mode_p':
generator.c:1256:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_quirks_mode_set':
generator.c:1267:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_depth':
generator.c:1279:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_depth_set':
generator.c:1291:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_buffer_initial_length':
generator.c:1304:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_buffer_initial_length_set':
generator.c:1317:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
make: *** [generator.o] Error 1

我正在使用Windows 7。

有人可以帮助我吗?

问题解决了,我使用的是错误版本的Ruby devkit。

0 个答案:

没有答案