-2

我尝试在 fedora linux 上安装 watir-webdriver。我运行了这个命令:

cat << EOF > /etc/yum.repos.d/ruby.repo
[ruby]
name=ruby for Fedora \$releasever - \$basearch - Base
baseurl=http://mirror.nl.ergo-project.org/repositories/custom-f13-ruby/x86_64/
failovermethod=priority
enabled=1
gpgcheck=0

[ruby-extra]
name=ruby extra for Fedora \$releasever - \$basearch - Base
baseurl=http://mirror.nl.ergo-project.org/repositories/feature-f13-ruby-1.9.1/x86_64/
failovermethod=priority
enabled=1
gpgcheck=0
EOF

yum -y --enablerepo=ruby,ruby-extra install ruby ruby-devel ruby-irb
gem update --system
gem install watir-webdriver

但是当我运行官方网站上提供的默认脚本但我有错误

./firewatir:3:in `require': no such file to load -- watir-webdriver (LoadError)
 from ./firewatir:3:in `<main>'

有人可以帮助我吗?

4

1 回答 1

3

由于您已将库安装为 gem,因此您需要在 watir-webdriver 之前加载 Rubygems,即:

require "rubygems"
require "watir-webdriver"
于 2010-10-06T21:46:14.293 回答