无法在Windows 10上安装C:\ Devkit> gem install json --platform = ruby

时间:2015-08-13 18:15:40

标签: c++ ruby devkit

我不断收到同样的错误消息:

C:\Devkit>gem install json --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing json:
    ERROR: Failed to build gem native extension.

D:/Ruby22/bin/ruby.exe -r ./siteconf20150813-3104-1rfxe1t.rb extconf.rb
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
generating generator-i386-mingw32.def
compiling generator.c
In file included from d:/Ruby22/include/ruby-2.2.0/ruby.h:33:0,
             from ../fbuffer/fbuffer.h:5,
             from generator.c:1:
d:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:111:14: error: size of array        'ruby_chec
k_sizeof_voidp' is negative
In file included from d:/Ruby22/include/ruby-2.2.0/ruby.h:33:0,
             from ../fbuffer/fbuffer.h:5,
             from generator.c:1:
d:/Ruby22/include/ruby-2.2.0/ruby/ruby.h: In function     '    rb_obj_freeze_inline':
 d:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1156:9: warning: cast to pointer      from integer of different size [-Wint-to-pointer-cast]
d:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1157:2: warning: cast to pointer from i
nteger of different size [-Wint-to-pointer-cast]


 make: *** [generator.o] Error 1

 make failed, exit code 2

 Gem files will remain installed in D:/Ruby22/lib/ruby/gems/2.2.0/gems/json-    1.8.3
 for inspection.
Results logged to D:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-     mingw32/2.2.0/jso
n-1.8.3/gem_make.out

关于从int转换为指针的警告还有很多。这也不允许我的捆绑安装'无论是。我不知道该改变什么。我下载了正确版本的Devkit。

0 个答案:

没有答案