首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ruby 8上的DevKit,仍然不能安装本机扩展

Ruby 8上的DevKit,仍然不能安装本机扩展
EN

Stack Overflow用户
提问于 2013-08-01 04:50:52
回答 1查看 789关注 0票数 0

我在Windows8 8-64位上使用Ruby1.9.3。我的Ruby在C:\Ruby193中,Devkit在C:\DevKit

我跟踪了DevKit的安装,这是一个成功的过程。

然后,指南要求我通过运行gem install json --platform=ruby来测试它,后者返回此错误(与安装DevKit之前类似):

Note:另一个问题here告诉我将DevKit安装文件夹添加到环境PATH中,我做到了,但仍然得到了相同的错误。

代码语言:javascript
复制
C:\Users\myname>gem install json --platform=ruby
Building native extensions.  This could take a while...
ERROR:  Error installing json:
        ERROR: Failed to build gem native extension.

    C:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile

make
generating generator-i386-mingw32.def
compiling generator.c
In file included from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:1381:0,
                 from c:/Ruby193/include/ruby-1.9.1/ruby.h:32,
                 from ../fbuffer/fbuffer.h:5,
                 from generator.c:1:
c:/Ruby193/include/ruby-1.9.1/ruby/missing.h:41:8: error: redefinition of 'struc
t timespec'
In file included from c:\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../.
./../../i686-w64-mingw32/include/process.h:12:0,
                 from c:/Ruby193/include/ruby-1.9.1/ruby/win32.h:62,
                 from c:/Ruby193/include/ruby-1.9.1/ruby/defines.h:223,
                 from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:67,
                 from c:/Ruby193/include/ruby-1.9.1/ruby.h:32,
                 from ../fbuffer/fbuffer.h:5,
                 from generator.c:1:
c:\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw
32/include/sys/types.h:89:8: note: originally defined here
In file included from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:1381:0,
                 from c:/Ruby193/include/ruby-1.9.1/ruby.h:32,
                 from ../fbuffer/fbuffer.h:5,
                 from generator.c:1:
c:/Ruby193/include/ruby-1.9.1/ruby/missing.h:48:8: error: redefinition of 'struc
t timezone'
In file included from c:/Ruby193/include/ruby-1.9.1/ruby/win32.h:63:0,
                 from c:/Ruby193/include/ruby-1.9.1/ruby/defines.h:223,
                 from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:67,
                 from c:/Ruby193/include/ruby-1.9.1/ruby.h:32,
                 from ../fbuffer/fbuffer.h:5,
                 from generator.c:1:
c:\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw
32/include/time.h:260:8: note: originally defined here
make: *** [generator.o] Error 1

有解决办法吗?谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-08-01 05:26:45

对不起,我用错了DevKit。

对于Ruby1.9.3和更低版本,我们应该使用DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe -- mingw为2.0及更高版本。

现在效果很好。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17985468

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档