代码之家  ›  专栏  ›  技术社区  ›  codemilan

为什么法拉第的依赖没有被邦德勒解决?

  •  1
  • codemilan  · 技术社区  · 8 年前

    我在rails gem文件中添加了gem“bitfinex rb”,当我进行bundle安装时,出现以下错误:

    Bundler could not find compatible versions for gem "faraday":
    In snapshot (Gemfile.lock):
      faraday (= 0.14.0)
    
    In Gemfile:
      bitfinex-rb was resolved to 0.1.0, which depends on
      faraday (>= 0.9.2, ~> 0.9.2)
    
    kucoin was resolved to 0.1.1, which depends on
      faraday (>= 0.13)
    
    Running `bundle update` will rebuild your snapshot from scratch, using only the gems in your Gemfile, which may resolve the conflict.  
    

    我试过运行bundle更新,但没有运气,给出以下错误。

        Bundler could not find compatible versions for gem "actionpack":
          In Gemfile:
            lograge (~> 0.3.1) was resolved to 0.3.6, which depends on
              actionpack (>= 3)
    
            pretender was resolved to 0.3.2, which depends on
              actionpack
    
            rails (~> 5.1.5) was resolved to 5.1.6, which depends on
              actionpack (= 5.1.6)
    
            rspec-rails (~> 3.6) was resolved to 3.7.2, which depends on
              actionpack (>= 3.0)
    
            simple_form was resolved to 4.0.1, which depends on
              actionpack (>= 5.0)
    
        Bundler could not find compatible versions for gem "actionview":
          In Gemfile:
            rails (~> 5.1.5) was resolved to 5.1.6, which depends on
              actionview (= 5.1.6)
    
            web-console was resolved to 3.6.2, which depends on
              actionview (>= 5.0)
    
        Bundler could not find compatible versions for gem "activemodel":
          In Gemfile:
            dynamoid (~> 2) was resolved to 2.2.0, which depends on
              activemodel (>= 4)
    
            paperclip (~> 5.3.0) was resolved to 5.3.0, which depends on
              activemodel (>= 4.2.0)
    
            rails (~> 5.1.5) was resolved to 5.1.6, which depends on
              activemodel (= 5.1.6)
    
            simple_form was resolved to 4.0.1, which depends on
              activemodel (>= 5.0)
    
        Bundler could not find compatible versions for gem "activerecord":
          In Gemfile:
            annotate was resolved to 2.7.4, which depends on
              activerecord (< 6.0, >= 3.2)
    
            rails (~> 5.1.5) was resolved to 5.1.6, which depends on
              activerecord (= 5.1.6)
    
            rails-erd was resolved to 1.5.2, which depends on
              activerecord (>= 3.2)
    
        Bundler could not find compatible versions for gem "activesupport":
          In Gemfile:
            bullet was resolved to 5.7.5, which depends on
              activesupport (>= 3.0.0)
    
            formulaic was resolved to 0.4.0, which depends on
              activesupport
    
            lograge (~> 0.3.1) was resolved to 0.3.6, which depends on
              activesupport (>= 3)
    
            paperclip (~> 5.3.0) was resolved to 5.3.0, which depends on
              activesupport (>= 4.2.0)
    
            rails (~> 5.1.5) was resolved to 5.1.6, which depends on
              activesupport (= 5.1.6)
    
            rails-erd was resolved to 1.5.2, which depends on
              activesupport (>= 3.2)
    
            rspec-rails (~> 3.6) was resolved to 3.7.2, which depends on
              activesupport (>= 3.0)
    
            shoulda-matchers was resolved to 3.1.2, which depends on
              activesupport (>= 4.0.0)
    
            spring was resolved to 2.0.2, which depends on
              activesupport (>= 4.2)
    
            time_difference was resolved to 0.7.0, which depends on
              activesupport (~> 5.1)
    
        Bundler could not find compatible versions for gem "aws-sdk-resources":
          In Gemfile:
            aws-sdk (= 2.10.47) was resolved to 2.10.47, which depends on
              aws-sdk-resources (= 2.10.47)
    
            dynamoid (~> 2) was resolved to 2.2.0, which depends on
              aws-sdk-resources (~> 2)
    
        Bundler could not find compatible versions for gem "faraday":
          In Gemfile:
            bitfinex-rb was resolved to 0.1.0, which depends on
              faraday (>= 0.9.2, ~> 0.9.2)
    
            kucoin was resolved to 0.1.1, which depends on
              faraday (>= 0.13)
    
        Bundler could not find compatible versions for gem "json":
          In Gemfile:
            bitfinex-rb was resolved to 0.1.0, which depends on
              json (>= 1.8.3, ~> 1.8.3)
    
            cryptocompare was resolved to 0.14.0, which depends on
              json
    
            simplecov was resolved to 0.16.1, which depends on
              json (< 3, >= 1.8)
    
        Bundler could not find compatible versions for gem "rails":
          In Gemfile:
            rails (~> 5.1.5)
    
            devise_token_auth was resolved to 0.1.43, which depends on
              rails (< 6)
    
            sparkpost_rails was resolved to 1.5.1, which depends on
              rails (< 5.3, >= 4.0)
    
            suspenders was resolved to 1.45.0, which depends on
              rails (~> 5.1.3)
    
            title was resolved to 0.0.7, which depends on
              rails (>= 3.1)
    
        Bundler could not find compatible versions for gem "railties":
          In Gemfile:
            devise_token_auth was resolved to 0.1.43, which depends on
              devise (< 4.5, > 3.5.2) was resolved to 4.4.3, which depends on
                railties (< 6.0, >= 4.1.0)
    
            dotenv-rails was resolved to 2.5.0, which depends on
              railties (< 6.0, >= 3.2)
    
            factory_bot_rails was resolved to 4.10.0, which depends on
              railties (>= 3.0.0)
    
            jquery-rails was resolved to 4.3.3, which depends on
              railties (>= 4.2.0)
    
            lograge (~> 0.3.1) was resolved to 0.3.6, which depends on
              railties (>= 3)
    
            rails (~> 5.1.5) was resolved to 5.1.6, which depends on
              railties (= 5.1.6)
    
            rspec-rails (~> 3.6) was resolved to 3.7.2, which depends on
              railties (>= 3.0)
    
            sass-rails (~> 5.0) was resolved to 5.0.7, which depends on
              railties (< 6, >= 4.0.0)
    
            web-console was resolved to 3.6.2, which depends on
              railties (>= 5.0)
    
        Bundler could not find compatible versions for gem "ruby":
          In Gemfile:
            ruby
    
        suspenders was resolved to 1.46.0, which depends on
              ruby (>= 2.5.0)  
    

    我尝试删除gemfile.lock并安装了bundle,但遇到了上面列出的错误。这类场景的解决方案是什么?谢谢大家。

    1 回复  |  直到 8 年前
        1
  •  2
  •   Ana María Martínez Gómez    8 年前

    这是因为Kucoin 0.1.1需要法拉第>=0.13,而Bitfinex RB 0.1.0需要法拉第~>0.9.2(所以>=0.9.2和<=0.10)。至少在RubyGems中没有更高版本的BitfinexRB,所以您可以更新它。另一个版本的kucoin(0.1.0)也需要法拉第>=0.13。因此,您不能同时安装两个gems(kucoin和bitfinex-rb),因为它们是相互依赖的。bundle尝试解析依赖项,但只有在可能的情况下才能这样做。

    推荐文章