【问题标题】:error installing waitr in ubuntu 11.10在 ubuntu 11.10 中安装服务员时出错
【发布时间】:2012-03-28 20:59:05
【问题描述】:

ruby ubuntu ruby​​gems wati 自动化测试工具 watir 在最新版本的 Ubuntu 中。

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

我也尝试删除 ruby​​ 和 ruby​​ gems 并重新安装,但错误消息仍然出现。

谁能告诉我怎么了?

root@kelley-VirtualBox:/home/kelley# gem -v
bash: /usr/bin/gem: No such file or directory
root@kelley-VirtualBox:/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) ...
root@kelley-VirtualBox:/home/kelley# gem list

*** LOCAL GEMS ***


root@kelley-VirtualBox:/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
root@kelley-VirtualBox:/home/kelley# 

【问题讨论】:

    标签: ruby ubuntu rubygems watir-webdriver


    【解决方案1】:

    查看Ubuntu documentation。您可以遵循一个全面的分步指南。

    似乎waitr 仅适用于 Windows。试试sudo gem install watir-webdriver

    【讨论】:

    • 正确。最初的 watir(“watir 经典”,如果你愿意的话)是在世界上 85% 的人使用 IE 时重新设计的。它使用win32ole与浏览器对话,只支持IE,只在windows上运行。 Watir-webdriver使用webdriver来控制浏览器,支持的浏览器和操作系统要多得多。
    • 谢谢,这就是我要找的。官方网站没有更新这些信息有点糟糕。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-07-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-29
    相关资源
    最近更新 更多