我正在尝试在新机器(Mac OS 10.10.1)上运行我的葫芦测试,但是当我运行命令时,我得到以下输出:

cannot load such file -- bundler/setup (LoadError)
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/Users/ptv618/Documents/cardapp_ui_tests/features/support/env.rb:2:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.18/lib/cucumber/rb_support/rb_language.rb:95:in `load'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.18/lib/cucumber/rb_support/rb_language.rb:95:in `load_code_file'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.18/lib/cucumber/runtime/support_code.rb:180:in `load_file'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.18/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.18/lib/cucumber/runtime/support_code.rb:82:in `each'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.18/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.18/lib/cucumber/runtime.rb:184:in `load_step_definitions'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.18/lib/cucumber/runtime.rb:42:in `run!'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.18/lib/cucumber/cli/main.rb:47:in `execute!'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.18/bin/cucumber:13:in `<top (required)>'
/usr/bin/cucumber:23:in `load'
/usr/bin/cucumber:23:in `<main>'


谁能帮我?我认为这是因为与配置有关,因为我之前可以运行此测试。

我正在使用Ruby 2.0.0。

谢谢!

最佳答案

我相信问题是您使用的是Apple的系统红宝石,需要sudo才能安装宝石。我对此可能是错的。您可以使用要执行的确切命令来更新您的问题吗?

瓢虫维护者建议使用托管的红宝石环境,例如rbenv或ruby。 [1]如果不是您喜欢的风格的红宝石,则可以覆盖GEM_HOMEGEM_PATH [2]


[1] https://github.com/calabash/calabash-ios/wiki/B2-Updating-your-run-loop-version
[2] http://developer.xamarin.com/guides/testcloud/calabash/osx-installation/

10-08 16:07