0

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

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

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

main:Object 的未定义局部变量或方法“start_test_server_in_background”

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'
4

1 回答 1

0

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

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

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

require 'calabash-cucumber/cucumber'

不是calabash-cucumber

于 2015-06-05T21:13:40.860 回答