1

Rails gem ファイルに gem 'bitfinex-rb' を追加しました。バンドル インストールを実行すると、以下のエラーが発生しました。

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 update を実行しようとしましたが、運が悪く、以下のエラーが発生します。

    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 を削除してバンドルをインストールしようとしましたが、上記の長いリストのエラーが発生しました。このタイプのシナリオの解決策は何ですか。皆さん、ありがとうございました。

4

1 に答える 1

2

これは、kucoin 0.1.1 がファラデー >= 0.13 を必要とし、bitfinex-rb 0.1.0 がファラデー ~> 0.9.2 を必要とするためです (つまり、>= 0.9.2 および <= 0.10)。少なくとも Ruby Gems には、bitfinex-rb の上位バージョンがないため、更新できます。また、他のバージョンの kucoin (0.1.0) もファラデー >= 0.13 が必要です。したがって、依存関係があるため、両方の gem (kucoin と bitfinex-rb) を同時にインストールすることはできません。バンドルは依存関係を解決しようとしますが、可能な場合にのみ実行できます。

于 2018-06-29T13:36:38.657 に答える