简体   繁体   English

无法在Windows 7 64位上安装Watir gem

[英]Unable to install Watir gem on Windows 7 64-bit

I am running into following error.When I try to install gem watir , below is the list of gems followed by gem install watir. 我遇到以下错误。当我尝试安装gem watir时,下面是gem列表,其次是gem install watir。

My system configurations is OS-Windows7(64 bit) and browser is IE=9 我的系统配置是OS-Windows7(64位),浏览器是IE = 9

   C:\Users\Farooq>gem list


   *** LOCAL GEMS ***

    bigdecimal (1.2.1, 1.1.0)
    childprocess (0.3.9)
    commonwatir (4.0.0)
    ffi (1.9.0 x86-mingw32)
    io-console (0.4.2, 0.3)
    json (1.8.0, 1.5.5)
    mini_portile (0.5.1)
    minitest (5.0.8, 2.5.1)
    multi_json (1.8.1)
    rake (10.1.0, 0.9.2.2)
    rdoc (4.0.1, 3.9.5)
    rubyzip (1.0.0, 0.9.9)
    selenium-webdriver (2.35.1)
    watir-webdriver (0.6.4)
    websocket (1.1.1, 1.0.7)
    win32-api (1.5.0 universal-mingw32)
    win32-process (0.7.3)
    windows-api (0.4.2)
    windows-pr (1.2.2)enter code here'
    enter code here

When I execute gem install watir. 当我执行gem install watir时。 I got the following output error. 我收到以下输出错误。

    C:\Users\Farooq>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.

    D:/Ruby193/bin/ruby.exe extconf.rb
    checking for libxml/parser.h... no
    -----
    libxml2 is missing.  please visit http://nokogiri.org/tutorials/installing_nokog
    iri.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=D:/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 D:/Ruby193/lib/ruby/gems/1.9.1/gems/nokogiri-
     1.6.0.rc1 for inspection.
     Results logged to D:/Ruby193/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.0.rc1/ext/nok
     ogiri/gem_make.out

     C:\Users\Farooq>
  1. Install Ruby correctly on Windows 7 64-bit 在Windows 7 64位上正确安装Ruby
  2. After successful installation of Ruby execute the following commands from command prompt for installing watir: 成功安装Ruby之后,从命令提示符处执行以下命令以安装watir:

    gem update --system --no-rdoc --no-ri gem更新--system --no-rdoc --no-ri
    gem install watir --no-rdoc --no-ri gem install watir --no-rdoc --no-ri

You can follow the links for details: 您可以单击链接获取详细信息:
http://www.mytechfetish.com/2013/08/installing-ruby-and-watir-on-windows-7.html http://www.mytechfetish.com/2013/08/installing-ruby-and-watir-on-windows-7.html

http://www.spritecloud.com/2011/04/complete-setup-guide-for-ruby-cucumber-and-watir-or-selenium-on-windows/ http://www.spritecloud.com/2011/04/complete-setup-guide-for-ruby-cucumber-and-watir-or-selenium-on-windows/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM