Ruby 不需要 working/uninitialized 常量

Ruby Require not working/uninitialized constant

多年来,我在 osx 机器上使用 Cucumber 和 Watir 运行ning 进行了一套 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 上进行了相同的设置并且可以正常工作。当我尝试要求它们时,它看起来可能没有正确加载文件?

想通了,原来我需要在我需要的文件之前添加一个 ./。奇怪的是 Centos 需要这个而 OSX 不需要。