I'm trying to update a specific Slack-Client gem from version 1 to version 2.
The problem that the version 2 uses another gem called Faraday with version 2 and I have in Gemfile another gem called Kit that uses Faraday version 1.
Bundler could not find compatible versions for gem "faraday":
In snapshot (Gemfile.lock):
faraday (= 1.10.2)
In Gemfile:
oktakit was resolved to 0.3.3, which depends on
faraday (>= 0.17.3, < 2)
slack-ruby-client (= 2.0.0) was resolved to 2.0.0, which depends on
faraday (>= 2.0)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
- I would like to know if there is a way to update Slack-Client to version 2 without create a new conflict
- I've tried different approaches, but all of them create the same error
CodePudding user response:
You cannot require the same gem multiple times in different versions in your application at the same time. In your case, this means that you cannot update slack-ruby-client
to a version that requires faraday >= 2.0
while keeping the oktakit
gem at a version that requires faraday < 2
.
Because there is no never version of oktakit
available, you are stuck and have to wait for oktakit
to be updated.
What you could try, is forking those gems and try if one of them would work with the faraday
version required by the other. Or you investigate if you can replace oktakit
with any other Okta related gem that supports your use case.