Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby Gem::Ext::BuildError:错误:无法生成Gem本机扩展(ffi Gem)-windows_Ruby_Windows - Fatal编程技术网

Ruby Gem::Ext::BuildError:错误:无法生成Gem本机扩展(ffi Gem)-windows

Ruby Gem::Ext::BuildError:错误:无法生成Gem本机扩展(ffi Gem)-windows,ruby,windows,Ruby,Windows,当我运行bundle安装时,当它尝试使用本机扩展安装ffi gem时,它会失败。我得到这个错误 Installing ffi 1.8.1 with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. C:/Ruby21-x64/bin/ruby.exe extconf.rb checking for ffi.h... no checkin

当我运行bundle安装时,当它尝试使用本机扩展安装ffi gem时,它会失败。我得到这个错误

Installing ffi 1.8.1 with native extensions

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    C:/Ruby21-x64/bin/ruby.exe extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for rb_thread_blocking_region()... yes
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
checking for ffi_prep_cif_var()... no
creating extconf.h
creating Makefile

make "DESTDIR="
generating ffi_c-x64-mingw32.def
Configuring libffi
configure: WARNING: if you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used
configure: WARNING: cache variable lt_cv_path_LD contains a newline
configure: WARNING: cache variable lt_cv_path_LD contains a newline
make -C "/c/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.8.1/ext/ffi_c/libffi-x64-mingw32"
make[1]: Entering directory `/c/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.8.1/ext/ffi_c/libffi-x64-mingw32'
Makefile:318: *** missing separator.  Stop.
make[1]: Leaving directory `/c/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.8.1/ext/ffi_c/libffi-x64-mingw32'
make: *** ["/c/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.8.1/ext/ffi_c/libffi-x64-mingw32"/.libs/libffi_convenience.a] Error 2


Gem files will remain installed in C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.8.1 for inspection.
Results logged to C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.8.1/ext/ffi_c/gem_make.out
An error occurred while installing ffi (1.8.1), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.8.1'` succeeds before bundling.

我在Windows7上,使用ruby 2.1.7和rails 3.2。我已经找到了不同的解决方案,比如更新系统gems和降级ffi版本,但它们都不适合我。我如何解决这个问题?

好吧,Makefile的第318行发生了什么?在CentOS AMI上运行相同的傀儡,rake 10.4.2,ffi 1.9.10,重新启动了Jenkins构建,错误再也没有出现过。。。奇怪的是,Makefile第318行附近发生了什么?如果CentOS AMI上的同一个运行木偶rake 10.4.2,ffi 1.9.10重新启动了Jenkins构建,错误就再也没有出现过。。。奇怪的