Closed tadao closed 2 years ago
@tadao What would happen if you added gem "patron"
to your Gemfile?
@tadao What would happen if you added
gem "patron"
to your Gemfile?
OMG. I added gem "patron"
and then everything worked out!! perfect!!
Thank you very much :)
@tadao to add to @olleolleolle, faraday 1.10
already has faraday-patron
as a dependency, which in turns has patron
as a dependency, meaning you should already have all of them in your bundle with just gem 'faraday', '~> 1.10'
in your Gemfile.
The issue you're having is that patron
is not automatically required by faraday-patron 1.0
(I need to check if this is intentional or not 🤔, you might have found a bug there).
You should be able to remove both faraday-patron
and patron
from your Gemfile, and then simply add require 'patron'
shortly after you require 'faraday'
in your app
Ah, it seems like the problem is we're including patron
as a dependency in faraday-patron
, which makes sense for v2, but not for v1 when adapter dependencies were manually added where needed.
@olleolleolle suggestion to add gem "patron"
to the Gemfile is the correct one then.
You should still be able to remove faraday-patron
from the Gemfile though and things should still work 👍
@iMacTia Thank you for your reply.
we're including patron as a dependency in faraday-patron, which makes sense for v2, but not for v1 when adapter dependencies were manually added where needed.
I got it. I found that if there is a faraday dependency on another gem, it will give me an error if I don't include the gem patron
.
Especially with RoR projects, this problem can occur. I currently have had this problem.
Thanks to the immediate response I received, I was able to solve the problem right away. I really appreciate it.
Basic Info
Issue description
I got this error,
missing dependency for Faraday::Adapter::Patron: cannot load such file -- patron (RuntimeError)
.Steps to reproduce
Gemfile
How can I fix this error?