0

嘿,这一切都是我在 ruby​​ 中的第一个项目,我正在尝试使用此处的说明安装水豚:https ://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit

我不断遇到这个错误。任何帮助表示赞赏。

Windows 10
Ruby 2.3
Qt 5.9.1

PATH has C:\Qt\5.9.1\msvc2015_64\bin and C:\Ruby23\bin


current directory: C:/Ruby23/lib/ruby/gems/2.3.0/gems/capybara-webkit-1.14.0
C:/Ruby23/bin/ruby.exe -r ./siteconf20170817-33208-1eyrgjv.rb extconf.rb
*** 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:/Ruby23/bin/$(RUBY_BASE_NAME)
--with-gl-dir
--without-gl-dir
--with-gl-include
--without-gl-include=${gl-dir}/include
--with-gl-lib
--without-gl-lib=${gl-dir}/lib
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
Command 'qmake ' not available

extconf failed, exit code 1
4

1 回答 1

1

Qt 5.9.1 默认不包含所需的 QtWebkit,因此您需要安装它。mkmf.log按照错误消息的指示查看并准确查看缺少的内容。

话虽如此,capybara-webkit 基于目前最多相当于一个 7 年历史的浏览器的技术,因此不支持现代应用程序中使用的很多东西。如果你不使用 capybara-webkit 而是使用 Capybara 和 selenium 和 headless chrome,你可能会好很多。

澄清说明:capybara-webkit 不是 capybara,它是一个可以与 capybara 一起使用的驱动程序。

于 2017-08-18T00:55:59.673 回答