【问题标题】:Unable to activate calabash-android-0.9.5, because json-2.1.0 conflicts with json (~> 1.8) (Gem::ConflictError)无法激活 calabash-android-0.9.5,因为 json-2.1.0 与 json (~> 1.8) 冲突 (Gem::ConflictError)
【发布时间】:2023-04-02 23:15:02
【问题描述】:

出现以下错误 - 无法激活 calabash-android,json 冲突

C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/specification.rb:2325:in raise_if_conflicts' C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/specification.rb:1438:inactivate' C:/Ruby25-x64/lib/ruby/2.5.0/rubygems.rb:224:in rescue in try_activate' C:/Ruby25-x64/lib/ruby/2.5.0/rubygems.rb:217:intry_activate' C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:128:in rescue in require' C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:inrequire' C:/Users/Sathish/Documents/tut/features/support/env.rb:1:in <top (required)>' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-2.0.0/lib/cucumber/rb_support/rb_language.rb:94:inload' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-2.0.0/lib/cucumber/rb_support/rb_language.rb:94:in load_code_file' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-2.0.0/lib/cucumber/runtime/support_code.rb:237:inload_file' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-2.0.0/lib/cucumber/runtime/support_code.rb:97:in block in load_files!' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-2.0.0/lib/cucumber/runtime/support_code.rb:96:ineach' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-2.0.0/lib/cucumber/runtime/support_code.rb:96:in load_files!' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-2.0.0/lib/cucumber/runtime.rb:242:inload_step_definitions' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-2.0.0/lib/cucumber/runtime.rb:65:in run!' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-2.0.0/lib/cucumber/cli/main.rb:38:inexecute!' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/cucumber-2.0.0/bin/cucumber:9:in<top (required)>' C:/Ruby25-x64/bin/cucumber:23:inload'

C:/Ruby25-x64/bin/cucumber:23:in `'

在我的 json 宝石列表中,它显示 json (default: 2.1.0, 1.8.6) 尝试卸载 gem json 2.1.0 但这是默认设置,无法卸载, 卸载了 1.8.0 但后来我得到了 C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/dependency.rb:312:in to_specs': Could not find 'json' (~> 1.8) - did find: [json-2.1.0] (Gem::MissingSpecVersio nError) Checked in 'GEM_PATH=C:/Users/Sathish/.gem/ruby/2.5.0;C:/Ruby25-x64/lib/ruby/gems/2.5.0', executegem env`了解更多信息

任何帮助..?

【问题讨论】:

    标签: ruby cucumber calabash-android


    【解决方案1】:

    由于您尝试使用的主要 gem 具有过时的依赖项,最简单的选择可能是通过安装和使用 Ruby 2.3 来避免内置的太新的 json gem。

    【讨论】:

    • 谢谢 :) 工作 :) 我将 ruby​​ 降级到 2.3 并卸载了不需要的 gems 版本并只保留了必需的版本。
    猜你喜欢
    • 1970-01-01
    • 2019-06-21
    • 1970-01-01
    • 2021-01-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-07
    相关资源
    最近更新 更多