我正在開發一個關於Fedora Linux的網站。我想運行測試。所以我選擇watir & ruby開發來測試。 所以我婉我系統上安裝的Watir但我有錯誤: 我跑這個劇本運行web測試框架watir在Firefox/Linux上
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'
但我對試運行失敗。我輸入一個紅寶石控制檯(只是運行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:in
to_constant_name' from /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:in
rescue 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
'`
是所有安裝的根目錄 – 2010-10-04 12:08:56