How to override gem dependency?

I have 2 gems that depend on conflicting hashie versions (this requires ~> 1.2.0, and 3.3.1 for the other):

Bundler could not find compatible versions for gem "hashie":
  In Gemfile:
    restforce (>= 0) ruby depends on
      hashie (~> 1.2.0) ruby

    omniauth (>= 0) ruby depends on
      hashie (3.3.1)

I would like to save both gems and use a higher version of the hashes. Is there a way for me to override one of the gem dependencies?

+4
source share
2 answers

The standard tip recommends using a higher version .

I do this way, but I think bundler has a specific command for it.

gem 'omniauth' Gemfile. bundle install, gem 'omniauth' Gemfile, .

Gemfile.lock, hashie 2.0.5, .

: ?

omniauth hashie: hashie < 4, >= 1.2, restforce: hashie < 2.1, >= 1.2.0. , hashie 1.2 2.0.x . Gemfile.lock, hassie 3.3.1, "omniauth" Gemfile. restforce , restforce '2.0.5'. , omniauth bundler , .

+1

, bundle update - , . , , , .

, .

0

All Articles