This was working fine in Rails 6 but now upgrading Rails and Ruby to 6.11 and 3, it's triggering this "classic" error. Basically, to be short, for example this external URL direct to Firefox logo, using the Rails console:
require 'open-uri'
open("https://brandemia.org/sites/default/files/inline/images/firefox_logo.jpg")
Traceback (most recent call last):
4: from (irb):1:in `<main>'
3: from (irb):2:in `rescue in <main>'
2: from (irb):2:in `open'
1: from (irb):2:in `initialize'
Errno::ENOENT (No such file or directory @ rb_sysopen - https://brandemia.org/sites/default/files/inline/images/firefox_logo.jpg)
In the app same error. Before the Rails and Ruby upgrade (with Ruby 2.5.8 and Rails 6.0.3.1) this was working perfectly fine.