Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I resolve dependency issues in bundler?

Tags:

ruby

bundler

I want to use the latest version of the oauth2 gem, I add it to my gemfile and run bundle install.

Bundler could not find compatible versions for gem "multi_json":
  In Gemfile:
    oauth2 (= 0.7.0) ruby depends on
      multi_json (~> 1.3) ruby

    uglifier (>= 0) ruby depends on
      multi_json (1.0.4)

Oh ok, well I'll update uglifier with bundle update uglifier

Bundler could not find compatible versions for gem "faraday":
  In snapshot (Gemfile.lock):
    faraday (0.5.7)

  In Gemfile:
    oauth2 (= 0.7.0) ruby depends on
      faraday (~> 0.8) ruby

Hmm, so I'll try bundle update oauth2?

Bundler could not find compatible versions for gem "multi_json":
  In Gemfile:
    oauth2 (= 0.7.0) ruby depends on
      multi_json (~> 1.3) ruby

    uglifier (>= 0) ruby depends on
      multi_json (1.0.4)

Oh that's right.. This is what I was trying to do in the first place. Well, maybe I can specify the newest version of uglifier gem 'uglifier', "~> 1.2.4" and bundle update uglifier again.

Bundler could not find compatible versions for gem "faraday":
  In Gemfile:
    oauth2 (~> 0.7.0) ruby depends on
      faraday (~> 0.8) ruby

    instagram (>= 0) ruby depends on
      faraday (0.5.7)

Well, bundle update instagram it is. Nope - back to multi_json incompatibilities between instagram and oauth2.

How do you go about resolving such an issue? Is this just a matter of the Instagram gem needing to be updated to use a newer multi json version? Or is there something else I should be attempting?

like image 393
Nathan Manousos Avatar asked Nov 04 '22 01:11

Nathan Manousos


1 Answers

Clear out your GEM directories at once and then execute a fresh bundle command. Think this like resetting a computer.

$GEM_PATH is where your gems live (each path is separated with two dots)

bundle show gem_name (will also show you where your gems are)

like image 92
Inanc Gumus Avatar answered Nov 16 '22 17:11

Inanc Gumus