【发布时间】:2010-09-30 08:51:00
【问题描述】:
我正在开发一个 Fedora linux 网站。我想运行测试。所以我选择了watir & ruby开发来测试。 所以我想在我的 system 上安装 watir 但我有错误: 我运行了这个脚本
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 --enablerepo=ruby,ruby-extra install ruby ruby-devel
gem update --system
gem install firewatir
gem uninstall activesupport
gem install activesupport --version '=2.3.8'
但是我在测试运行时失败了。我进入一个 ruby 控制台(只是运行 irb 命令),当我 require 'firewatir' 没问题(控制台显示我是真的)但是当我创建一个新测试时 ff=Firewatir::Firefox.new
我有 irb(main):002:0> ff=Firewatir::Firefox.new
ArgumentError: Anonymous modules have no name to be referenced by
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:585:into_constant_name'
来自 /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:391:in qualified_name_for'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:104:inrescue in const_missing'
来自 /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:94:in const_missing'
from (irb):2
from /usr/local/bin/irb:12:in'`
【问题讨论】:
标签: linux fedora watir firewatir