【发布时间】:2015-06-18 02:06:50
【问题描述】:
我正在尝试让 Rails 在 Windows 系统上运行。我安装了 RubyInstaller 和 Devkit,但我似乎无法安装 json gem。当我尝试gem install json 时,我得到:
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
generator.c:1:0: error: CPU you selected does not support x86-64 instruction set
generator.c:1:0: error: CPU you selected does not support x86-64 instruction set
make: *** [generator.o] Error 1
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.3 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.3/ext/json/ext/generator/gem_make.out
可能是我的 Ruby 版本(我有 2.2 和 1.9),但我不知道。怎么回事?
【问题讨论】:
-
嗨,如果你用谷歌搜索特定的错误消息“错误:无法构建 gem 原生扩展。”你会发现这个问题之前已经回答过了。我已经投票赞成关闭您可以尝试的更明显的候选人。
-
我在 Google 上搜索了
generator.c:1:0: error: CPU you selected does not support x86-64 instruction set并没有得到任何有用的信息,你确定这些是同一个问题吗? -
另外,所有答案似乎都适用于 Linux / Ubuntu 系统
-
嘿,你能发布你正在使用的 DevKit 的版本吗?看起来它对我来说可能是一个不匹配的 DevKit。
标签: ruby-on-rails ruby json windows gem