[英]Ruby: Cannot Install Watir Gem On Windows
Watir's site says I need Ruby 1.8.6, which I'm running. Watir的网站说我需要Ruby 1.8.6,我正在运行。 And windows installation should be as simple as
gem install watir
. Windows安装应该像
gem install watir
一样简单。 But when I run that, I get this: 但是当我运行它时,我得到了这个:
C:\Users\Ryguy\Code>gem install watir
Building native extensions. This could take a while...
ERROR: Error installing watir:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe extconf.rb
checking for strncpy_s()... no
creating Makefile
make
'make' is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/win32-api-1.4.5 f
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/win32-api-1.4.5/ext/gem_make.out
My Ruby Version: ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32] 我的Ruby版本: ruby 1.8.6(2009-08-04 patchlevel 383)[i386-mingw32]
My RubyGems Version: 1.3.5 我的RubyGems版本: 1.3.5
Turns out I needed to install the Ruby Development files. 结果我需要安装Ruby Development文件。 =/
= /
Execute Below command and its works 执行以下命令及其工作原理
gem install watir --platform=mswin32 gem install watir --platform = mswin32
Installed devkit and after calling the bat file on Windows 7 from a cmd it fixed this issue. 安装devkit并在从cmd调用Windows 7上的bat文件后修复了这个问题。 Using Ruby 1.9.1
使用Ruby 1.9.1
I also had to install nokogiri to get Watir to install successfully on windows, after installing DevKit. 在安装DevKit之后,我还必须安装nokogiri才能让Watir在Windows上成功安装。 Use: gem install nokogiri
使用:gem install nokogiri
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.