我一直在努力让Watir在我的Windows 7 x64机器上工作。我使用以下内容:
http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-1.9.3-p448.exe https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe
我首先安装上面列出的ruby.exe,当安装到c:\ ruby193时似乎没问题。然后我将上面列出的开发工具包解压缩到c:\ devkit。然后我切换到c:\ rubydev并运行ruby dk.rb init
并打开config.yml文件以确保它是正确的,它是。然后我跑了ruby dk.rb install
,这看起来很顺利,结果得到了以下结果:
[INFO] Updating convenience notice gem override for 'C:/Ruby193'
[INFO] Installing 'C:/Ruby193/lib/ruby/site_ruby/devkit.rb'
当我尝试安装watir时出现问题。我键入gem install watir
并获得以下内容:
C:\Ruby193>gem install watir
Fetching: commonwatir-4.0.0.gem (100%)
Fetching: multi_json-1.7.9.gem (100%)
Fetching: rubyzip-0.9.9.gem (100%)
Fetching: ffi-1.9.0-x86-mingw32.gem (100%)
Fetching: childprocess-0.3.9.gem (100%)
Fetching: websocket-1.0.7.gem (100%)
Fetching: selenium-webdriver-2.35.0.gem (100%)
Fetching: watir-webdriver-0.6.4.gem (100%)
Fetching: win32-process-0.7.2.gem (100%)
Fetching: win32-api-1.4.9-x86-mingw32.gem (100%)
Fetching: windows-api-0.4.2.gem (100%)
Fetching: windows-pr-1.2.2.gem (100%)
Fetching: mini_portile-0.5.1.gem (100%)
Fetching: nokogiri-1.6.0.rc1.gem (100%)
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:/Ruby193/bin/ruby.exe extconf.rb
checking for libxml/parser.h... no
-----
libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** 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:/Ruby193/bin/ruby
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--with-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/lib
--with-xslt-dir
--without-xslt-dir
--with-xslt-include
--without-xslt-include=${xslt-dir}/include
--with-xslt-lib
--without-xslt-lib=${xslt-dir}/lib
--with-libxslt-config
--without-libxslt-config
--with-pkg-config
--without-pkg-config
--with-libxml-2.0-config
--without-libxml-2.0-config
--with-pkg-config
--without-pkg-config
--with-libiconv-config
--without-libiconv-config
--with-pkg-config
--without-pkg-config
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.0.rc1 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.0.rc1/ext/nokogiri/gem_make.out
我不知道该怎么做,我已经尝试清理目录并再次执行该过程,但似乎无法通过这个。
我的最终目标是安装Watir,以便在IE中进行自动化测试。