Ok. Could be needed in the rake task. I’ll add it and see…
EDIT: Nope. That’s not it.
It is failing at
/var/www/discourse/plugins/discourse-azure-blob-storage/lib/azure_blob_store.rb:25:in `rescue in store_file'
/var/www/discourse/lib/upload_creator.rb:160:in `block (2 levels) in create_for'
/var/www/discourse/lib/upload_creator.rb:159:in `block in create_for'
Now I’m totally baffled. How do I get rid of that missing dependency error?
For some strange reason, when I click on the little arrow at the end of the stack trace, it brings me to
discourse/discourse-azure-blob-storage instead of my own fork. I am quite sure I’m using my own fork in
I tried moving back a version to
azure-storage-common 2.0.1 which does not use
net-http-persistent, but then it uses
1.10 which conflicts with something that requires version
Anybody knows how to resolve nokogiri version conflicts?
@pfaffman do you have any ideas?
@maja not sure if you’re still following up on this plugin. As the original author you may have an idea what’s going on.
I have been baffled at an error for some time.
Recently it seems Discourse starts requiring
1.11, which mandates updating to
2.0.1. However, that version uses
net-http-persistent to make HTTP calls (previous versions didn’t).
Every time an azure call is made, it fails with a missing dependency:
missing dependency for Faraday::Adapter::NetHttpPersistent: cannot load such file -- net/http/persistent.
The strange thing is, even if I put
require 'net/http/persistent' each time before the call, it still fails with the exact same error. Even though
true meaning that the module is loaded.
It seems to start happening during the second time calling azure functions. For certain uploads, the first time will succeed, and the second_ time on will start giving missing dependency.
It almost feels like something is overwriting the
require cache wiping out
azure-storage-blob and modifying to remove the
net-http-persistent but can’t find a way to get Discourse to load from an alternative git repo… it seems always to be loading the official gem.
Update: There is a fix which works reasonably. However, it is still undergoing some further testing as it seems to conflict with other places.
The main error came from the fact that
Faraday has its own dependency management system which conflicts with the Bundler.
The current solution basically just ignores the error from Faraday and loads the dependency statically. However, some kind soul may also point out a way to do it more elegantly…