#<Object:0x007ffc49a5e130> 的未定义局部变量或方法“start_test_server_in_background”

undefined local variable or method `start_test_server_in_background' for #<Object:0x007ffc49a5e130>

之前有人问过 .12.0,但我现在在 .14.2 中遇到了类似的错误。

直到几周前,我还在使用 运行 calabash.framework 11.4,因为它工作正常,稳定,并且在我们的开发服务器上处于锁定状态。我们经历了更新所有 gem 和服务的最新状态,虽然我们的构建服务器仍在运行,但 calabash 不再识别 "start_server_in_background" 方法。我不知道如何解决这个问题。我尝试完全擦除并在我的本地镜像上重新安装无济于事,并且正在考虑将所有内容回滚到以前的工作版本。但是我想解决这个问题以使所有内容保持最新。

我尝试了以下解决方案但没有成功。

undefined local variable or method `start_test_server_in_background' for main:Object

https://github.com/calabash/calabash-ios/issues/669

https://github.com/calabash/calabash-android/issues/371

这是我在场景运行后的错误

undefined local variable or method `start_test_server_in_background' for #<Object:0x007f9a7c07ba48> (NameError)
      /Users/mycomp/.rvm/gems/ruby-2.2.1@global/gems/rspec-expectations-3.2.1/lib/rspec/matchers.rb:926:in `method_missing'
      /Users/mycomp/KonyiOSWorkspace/user/Kony/iOS-6.0.3.GA_v201503250510/VMAppWithKonylib/features/mobile/helpers/ios/support/app_life_cycle_hooks.rb:44:in `Before'

启动应用程序的推荐方法是使用:

options = { }
launcher.relaunch(options)
launcher.calabash_notify(self)

在您的 support/env.rb 文件中,您需要:

require 'calabash-cucumber/cucumber'

不是calabash-cucumber