【问题标题】:Install Devkit: Failed to build gem native extension安装 Devkit:无法构建 gem 原生扩展
【发布时间】:2013-08-23 21:31:08
【问题描述】:

我感到很惭愧,它无法在我的设备上解决这个问题。我现在用谷歌搜索了几天,但不知何故我没有成功。当我尝试按照以下安装步骤操作时:https://github.com/oneclick/rubyinstaller/wiki/Development-Kit 最后想要安装 json 我得到这个错误:

 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.

 C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
    creating Makefile

  make "DESTDIR="
  generating generator-i386-mingw32.def
  compiling generator.c
  linking shared-object json/ext/generator.so
  c:/devkit/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: can
  not find -lmsvcrt-ruby191
  collect2: ld returned 1 exit status
  make: *** [generator.so] Error 1


  Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9
  .1/gems/json-1.8.0 for inspection.
  Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/json-1.8.
  0/ext/json/ext/generator/gem_make.out

有人可以帮助我吗?谢谢

【问题讨论】:

    标签: ruby devkit


    【解决方案1】:

    在window 7 64位系统上
    1)如果你想使用 ruby​​ 版本 lesst 然后 ruby​​ 2.0 2)您需要在窗口 7 x64 位上从 http://rubyinstaller.org/downloads/ 安装 DevKit 32 位

    如果你想在window 7上安装ruby 2或更高版本所以你需要安装DevKit 64位

    使用 64 位的 ruby​​ 2

    在 windows 7 64 位系统上使用 DevKit 64 位 ruby​​ 32 位将无法工作

    但是带有 Devkit 32 位和 ruby​​ 32 位的 windows 7 64 位系统可以工作

    这个问题不会来

    【讨论】:

      猜你喜欢
      • 2012-09-15
      • 2014-04-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-02
      • 2016-01-17
      • 1970-01-01
      • 2012-07-24
      相关资源
      最近更新 更多