问题
I'm developing a website on fedora linux. I want to run test. So I choose watir & ruby development to test. So I wan to install watir on my system but I have errors : I ran this script
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'
But I have failure on test running. I enter in a ruby console (just running irb command) and when I require 'firewatir'
it is ok (the console show me true) but when I create a new test ff=Firewatir::Firefox.new
I have 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'
from /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
'`
回答1:
might be a permissions thing
Did you install as a privileged user?
来源:https://stackoverflow.com/questions/3829096/run-web-testing-framework-watir-on-firefox-linux