为什么在Windows 8上无法安装json 1.8.6 gem? [英] Why is installing the json 1.8.6 gem on Windows 8 not working?

查看:155
本文介绍了为什么在Windows 8上无法安装json 1.8.6 gem?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经克隆了Rails应用程序,并试图在PC上安装所有gems.我正在运行Windows 8.1 x64,并且已经在C:/devkit中安装了x64 devkit,并且正在使用uru管理ruby版本,以便可以使用ruby 2.3.1.

I've cloned down a Rails app and am trying to install all the gems on my PC. I'm running Windows 8.1 x64, and I've installed the x64 devkit at C:/devkit and am using uru to manage ruby versions so that I can use ruby 2.3.1.

当我运行捆绑安装或 gem install json -v'1.8.6'-r --source http://rubygems.org/,我得到以下错误日志:

When I run bundle install or gem install json -v '1.8.6' -r --source http://rubygems.org/, I get the following error log:

    current directory: C:/Ruby23/lib/ruby/gems/2.3.0/gems/json-1.8.6/ext/json/ext/generator
C:/Ruby23/bin/ruby.exe -r ./siteconf20170216-17824-1b67o5.rb extconf.rb 
creating Makefile

current directory: C:/Ruby23/lib/ruby/gems/2.3.0/gems/json-1.8.6/ext/json/ext/generator
make "DESTDIR=" clean

current directory: C:/Ruby23/lib/ruby/gems/2.3.0/gems/json-1.8.6/ext/json/ext/generator
make "DESTDIR="
generating generator-i386-mingw32.def
compiling generator.c
In file included from c:/Ruby23/include/ruby-2.3.0/ruby.h:33:0,
                 from ../fbuffer/fbuffer.h:5,
                 from generator.c:1:
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:131:14: error: size of array 'ruby_check_sizeof_voidp' is negative
In file included from c:/Ruby23/include/ruby-2.3.0/ruby.h:33:0,
                 from ../fbuffer/fbuffer.h:5,
                 from generator.c:1:
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_obj_freeze_inline':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1360:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1361:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1362:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1362:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_data_object_get':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1400:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_data_object_make':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1414:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_data_typed_object_make':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1421:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_num2char_inline':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1587:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1587:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1587:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1587:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1587:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1587:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1588:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1588:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1588:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_class_of':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1949:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_type':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1966:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
In file included from c:/Ruby23/include/ruby-2.3.0/ruby.h:33:0,
                 from ../fbuffer/fbuffer.h:5,
                 from generator.c:1:
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_clone_setup':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1997:56: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1998:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1999:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:1999:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_dup_setup':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2005:42: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2006:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2006:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_array_len':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2012:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2013:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2013:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_array_const_ptr':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2027:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2027:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2027:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_struct_len':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2034:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2035:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2035:26: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h: In function 'rb_struct_const_ptr':
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2041:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2041:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c:/Ruby23/include/ruby-2.3.0/ruby/ruby.h:2041: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:127:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../fbuffer/fbuffer.h:127:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../fbuffer/fbuffer.h:127: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:135:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:135:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:135:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:136:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:136:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:136:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'convert_UTF8_to_JSON':
generator.c:233:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:233:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:233:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:234:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:234:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:234:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_s_allocate':
generator.c:551:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_configure':
generator.c:572:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:572:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:572:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:573:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:573:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:573:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:580:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:580:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:580:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:581:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:581:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:581:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:588:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:588:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:588:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:589:40: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:589:40: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:589:40: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:596:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:596:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:596:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:597:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:597:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:597:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:604:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:604:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:604:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:605:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:605:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:605:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'set_state_ivars':
generator.c:655:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:655:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:655:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'generate_json':
generator.c:892:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:892:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:892:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'isArrayOrObject':
generator.c:953:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:953:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:953:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:954:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:954:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:954:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_indent_set':
generator.c:1078:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1078:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1078:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1087:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1087:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1087:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_space_set':
generator.c:1116:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1116:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1116:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1125:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1125:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1125:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_space_before_set':
generator.c:1152:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1152:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1152:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1161:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1161:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1161:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_object_nl_set':
generator.c:1190:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1190:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1190:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1198:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1198:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1198:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c: In function 'cState_array_nl_set':
generator.c:1225:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1225:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1225:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1233:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1233:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
generator.c:1233:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
make: *** [generator.o] Error 1

make failed, exit code 2

我尝试过:

  • 安装json_pure并将其指定在我的gemfile中以用于 :mswin& :mingw
  • 正在运行包更新
  • 从PATH变量中删除所有带有空格的内容
  • 浏览devkit故障排除选项列表此处
  • installing json_pure and specifying it in my gemfile for use with :mswin & :mingw
  • running bundle update
  • removing everything with spaces from my PATH variable
  • going through the list of devkit troubleshooting options here

我也浏览了很多其他类似的SE问题,但是

I've also trawled through a good number of other SE questions that are similar, but the one that looks most relevant to my situation remains unanswered.

关于可能出了什么问题的其他建议吗?

Any more suggestions about what could be going wrong?

推荐答案

您的平台不匹配.

generating generator-i386-mingw32.def是Ruby的x86版本,您说您正在使用x64 DevKit.

generating generator-i386-mingw32.def is the x86 version of Ruby and you said you are using the x64 DevKit.

这篇关于为什么在Windows 8上无法安装json 1.8.6 gem?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆