0

当我使用命令输入 create new rails app: rails new app
it can not install json extension

显示此消息:

Installing json (1.8.0)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.

    C:/Ruby200-x64/bin/ruby.exe extconf.rb
creating Makefile

make
generating generator-x64-mingw32.def
compiling generator.c
make: x86_64-w64-mingw32-gcc: Command not found
make: *** [generator.o] Error 127


Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/json-
1.8.0 for inspection.
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/json-1.8.0/ext/json/ex
t/generator/gem_make.out
An error occurred while installing json (1.8.0), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.0'` succeeds before bundling.

这个问题的解决方案是什么????

4

1 回答 1

0

出于某种原因make试图使用一个名为的命令x86_64-w64-mingw32-gcc来编译文件generator.c。这是在cygwin吗?我认为您只需要gcc使用 cygwin 安装程序进行安装。

于 2013-05-24T12:43:04.537 回答