我已经使用Cucumber和Watir在osx机器上运行了多年的Ruby测试。但是,现在我需要它们在Centos 6.6上运行。
我认为(希望)我已经正确安装了所有东西。但是,当我尝试运行我的测试时,我在Centos上遇到了这个错误,我无法弄清楚。
bash-4.1$ bundle exec cucumber -p local_sun features/clones/registering/registration_step_one_successful.feature GRID=true
Using the local_sun profile...
uninitialized constant Common::Utils::Hydra::Hydra::HttpRequests (NameError)
./lib/common/utils/hydra.rb:12
./lib/chimera-automation.rb:3:in `require'
./lib/chimera-automation.rb:3:in `require_files'
./lib/chimera-automation.rb:3:in `each'
./lib/chimera-automation.rb:3:in `require_files'
./lib/chimera-automation.rb:2:in `each'
./lib/chimera-automation.rb:2:in `require_files'
./features/support/env.rb:54
/var/lib/jenkins/qa-automation-ruby-client-delivery/features/clones/support/env.rb:2:in `require'
/var/lib/jenkins/qa-automation-ruby-client-delivery/features/clones/support/env.rb:2
/var/lib/jenkins/qa-automation-ruby-client-delivery/features/clones/support/env.rb:2:in `each'
/var/lib/jenkins/qa-automation-ruby-client-delivery/features/clones/support/env.rb:2
/var/lib/jenkins/.rvm/gems/ruby-1.8.7-head/gems/cucumber-1.2.5/bin/../lib/cucumber/rb_support/rb_language.rb:137:in `load'
/var/lib/jenkins/.rvm/gems/ruby-1.8.7-head/gems/cucumber-1.2.5/bin/../lib/cucumber/rb_support/rb_language.rb:137:in `load_code_file'
/var/lib/jenkins/.rvm/gems/ruby-1.8.7-head/gems/cucumber-1.2.5/bin/../lib/cucumber/runtime/support_code.rb:180:in `load_file'
/var/lib/jenkins/.rvm/gems/ruby-1.8.7-head/gems/cucumber-1.2.5/bin/../lib/cucumber/runtime/support_code.rb:83:in `load_files!'
/var/lib/jenkins/.rvm/gems/ruby-1.8.7-head/gems/cucumber-1.2.5/bin/../lib/cucumber/runtime/support_code.rb:82:in `each'
/var/lib/jenkins/.rvm/gems/ruby-1.8.7-head/gems/cucumber-1.2.5/bin/../lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/var/lib/jenkins/.rvm/gems/ruby-1.8.7-head/gems/cucumber-1.2.5/bin/../lib/cucumber/runtime.rb:182:in `load_step_definitions'
/var/lib/jenkins/.rvm/gems/ruby-1.8.7-head/gems/cucumber-1.2.5/bin/../lib/cucumber/runtime.rb:41:in `run!'
/var/lib/jenkins/.rvm/gems/ruby-1.8.7-head/gems/cucumber-1.2.5/bin/../lib/cucumber/cli/main.rb:43:in `execute!'
/var/lib/jenkins/.rvm/gems/ruby-1.8.7-head/gems/cucumber-1.2.5/bin/../lib/cucumber/cli/main.rb:20:in `execute'
/var/lib/jenkins/.rvm/gems/ruby-1.8.7-head/gems/cucumber-1.2.5/bin/cucumber:14
/var/lib/jenkins/.rvm/gems/ruby-1.8.7-head/bin/cucumber:23:in `load'
/var/lib/jenkins/.rvm/gems/ruby-1.8.7-head/bin/cucumber:23
我的Mac上有相同的设置,但它确实有效。当我试图要求它们时,它似乎可能没有正确加载文件?
答案 0 :(得分:0)
想出来,事实证明我需要在我需要的文件之前添加./。很奇怪Centos需要这个,OSX没有。