Azure / azure-storage-ruby

Microsoft Azure Storage Library for Ruby
http://azure.github.io/azure-storage-ruby/
84 stars 150 forks source link

missing dependency for Faraday::Adapter::NetHttpPersistent: cannot load such file -- net/http/persistent #189

Closed schungx closed 3 years ago

schungx commented 3 years ago

The latest version with persistent HTTP calls is failing with the following error:

missing dependency for Faraday::Adapter::NetHttpPersistent: cannot load such file -- net/http/persistent

The call is to create_block_blob.

The appropriate dependencies have been specified:

gem 'faraday_middleware', '1.0.0', {require: false}
gem 'net-http-persistent', '4.0.0', {require: false}
gem 'azure-storage-common', '2.0.2', {require: false}
gem 'azure-storage-blob', '2.0.1', {require: false}

require 'azure/storage/blob'

And yes, I can see net-http-persistent being bundled.

I tried putting: require 'net/http/persistent' here but it doesn't help. The same error.

Any pointers?

schungx commented 3 years ago

Turns out that it seems Faraday's internal dependency loaded conflicts with the Bundler for net-http-persistent.

This brings about an urgent need to have an option to disable net-http-persistent...