How to resolve gem install conflicts for fastlane v 2.162.0

Viewed 1749

I'm atttempting to update fastlane to the newest version running:

sudo gem install fastlane -v 2.162.0

And it's erroring out with

ERROR:  While executing gem ... (Gem::DependencyResolutionError)
    conflicting dependencies faraday (~> 0.12) and faraday (~> 1.0)
  Activated faraday-1.0.0
  which does not match conflicting dependency (~> 0.12)

  Conflicting dependency chains:
    fastlane (= 2.162.0), 2.162.0 activated, depends on
    faraday (~> 1.0), 1.0.0 activated

  versus:
    fastlane (= 2.162.0), 2.162.0 activated, depends on
    google-api-client (>= 0.37.0, < 0.39.0), 0.37.0 activated, depends on
    googleauth (~> 0.9), 0.9.0 activated, depends on
    faraday (~> 0.12)

  Gems matching faraday (~> 0.12):
    faraday-0.17.3

When I run

sudo gem list

It shows:

...
faraday (1.0.0, 0.17.3)
...
google-api-client (0.38.0)
...
googleauth (0.9.0)
...

Why is it saying google-api-client 0.37.0 activated if I uninstalled that version and only have 0.38.0 installed?

2 Answers

Not sure why the problem happened, but I ended up fixing it by doing the following commands in order:

sudo gem uninstall faraday
sudo gem uninstall google-api-client
sudo gem uninstall googleauth
sudo gem update
sudo gem install fastlane -v 2.162.0

I run into this issue too.

Based on DanielRead's answer, I execute following commands.

sudo gem cleanup
sudo gem update
sudo gem cleanup
sudo gem update
// .... 

When sudo gem update upgrade fastlane to the latest version (2.163.0), I end up above command cycle.

  1. sudo gem cleanup will remove redundant packages with old versions.
  2. sudo gem update will update packages to latest version.

But, due to dependency conflicts, some package upgrading will fail. (ex: fastlane). So, continue above commands to resolve dependency conflicts.

Related