gpt4 book ai didi

ruby - 在 Windows 8 上安装 Watir 时出错

转载 作者:数据小太阳 更新时间:2023-10-29 08:39:01 25 4
gpt4 key购买 nike

您好,我正在尝试安装 watir。我已经安装了 Ruby 并更新了 RubyGem 管理器。当我尝试安装 watir(Windows 8 64 位)时,我得到以下信息:

C:\devkit>gem install watir
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing watir:
ERROR: Failed to build gem native extension.

C:/Ruby200-x64/bin/ruby.exe extconf.rb
checking for ffi.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby200-x64/bin/ruby
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:431:in `try_do': The compiler failed to generate an executable
file. (RuntimeError)
You have to install development tools first.
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:562:in `try_cpp'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1041:in `block in have_header'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:892:in `block in checking_for'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:337:in `block (2 levels) in postpone'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:307:in `open'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:337:in `block in postpone'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:307:in `open'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:333:in `postpone'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:891:in `checking_for'
from C:/Ruby200-x64/lib/ruby/2.0.0/mkmf.rb:1040:in `have_header'
from extconf.rb:16:in `<main>'


Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ffi-1.8.1 for inspection.

Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/ffi-1.8.1/ext/ffi_c/gem_make.out

最佳答案

你有正确版本的 devkit 吗?看起来您需要来自 http://rubyinstaller.org/downloads/Ruby 2.0.0 x64(64 位):mingw64-64-4.7.2

关于ruby - 在 Windows 8 上安装 Watir 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16169742/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com