2012-03-28 154 views
0

ruby​​ ubuntu ruby​​gems wati自动化测试工具watir在最新版本的Ubuntu中。ubuntu安装waitr错误11.10

我做了一个sudo apt-get install ruby​​来获取最新版本的ruby,然后我安装了Rubygems并尝试安装watir,但是我收到了这个错误。 它使用红宝石1.8.7

我也尝试删除红宝石和红宝石宝石并重新安装,但错误信息仍然发生。

谁能告诉我什么是错的?

[email protected]:/home/kelley# gem -v 
bash: /usr/bin/gem: No such file or directory 
[email protected]:/home/kelley# sudo apt-get install rubygems 
Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
The following package was automatically installed and is no longer required: 
    libtcltk-ruby1.8 
Use 'apt-get autoremove' to remove them. 
The following NEW packages will be installed: 
    rubygems 
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. 
Need to get 0 B/425 kB of archives. 
After this operation, 4,166 kB of additional disk space will be used. 
Selecting previously deselected package rubygems. 
(Reading database ... 157806 files and directories currently installed.) 
Unpacking rubygems (from .../rubygems_1.7.2-1_all.deb) ... 
Processing triggers for man-db ... 
Setting up rubygems (1.7.2-1) ... 
[email protected]:/home/kelley# gem list 

*** LOCAL GEMS *** 


[email protected]:/home/kelley# gem install watir 
Building native extensions. This could take a while... 
ERROR: Error installing watir: 
    ERROR: Failed to build gem native extension. 

     /usr/bin/ruby1.8 extconf.rb 
checking for strncpy_s()... no 
creating Makefile 

make 
gcc -I. -I. -I/usr/lib/ruby/1.8/i686-linux -I. -D_FILE_OFFSET_BITS=64 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -c win32/api.c 
win32/api.c:2:21: fatal error: windows.h: No such file or directory 
compilation terminated. 
make: *** [api.o] Error 1 


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/win32-api-1.4.8 for inspection. 
Results logged to /usr/lib/ruby/gems/1.8/gems/win32-api-1.4.8/ext/gem_make.out 
[email protected]:/home/kelley# 

回答

4

看看Ubuntu documentation。有一个全面的,分步指南,你可以遵循。

看起来像waitr是仅限Windows。尝试sudo gem install watir-webdriver

+0

正确。原来的watir(如果你愿意的话,可以使用“watir classic”),当世界上有85%的人使用IE时,它就被重新设计了。它使用win32ole与浏览器交谈,并且只支持IE,并且只能在Windows上运行。 Watir-webdriver使用webdriver来控制浏览器,并支持更多的浏览器和操作系统。 – 2012-03-29 03:19:04

+0

谢谢,这正是我所寻找的。它有点糟糕,官方网站不更新此信息。 – Hitsurume 2012-03-29 21:15:23