为什么自从升级到 Puppet4 后自定义事实就再也找不到 `rb_sysopen` 了?

Why could `rb_sysopen` not be found anymore by the custom fact since the upgrade to Puppet4?

以下custom fact

# returns latest packerversion, e.g. 0.10.1
Facter.add("latest_packerversion") do
  setcode do
    url="https://www.packer.io/downloads.html"

    file = open("#{url}")
    contents = file.read()

    match = contents.match(/Latest\sversion:\s(.*)</)
    match[1]
  end
end

使用 puppet 3.6.2 工作,但自从升级到 4.5.2 后,发生了 following issue

Error: Facter: error while resolving custom fact "latest_packerversion":
No such file or directory @ rb_sysopen - https://www.packer.io/downloads.html

分析

Puppet 4, both Facter 2.4 and CFacter 0.4, the latest Hiera and Mcollective, as well Ruby 2.1.5, OpenSSL 1.0.0r, and our gem dependencies.

问题

为什么自从升级到 Puppet4 后,rb_sysopen 无法再通过自定义事实找到?

简洁

我将在这两个事实中包含 require 'open-uri',但我不明白为什么升级到 Puppet4 后需要这样做

详细

一旦 require 'open-uri' 包含在自定义事实之一中,问题就解决了。

# returns latest gitversion, e.g. 2.8.2
Facter.add("latest_gitversion") do
  setcode do
require 'open-uri'

    url="https://git-scm.com/downloads"

    file = open("#{url}")
    contents = file.read()

    match = contents.match(/RelNotes.*((\d\.){2}\d)/)
    match[1]
  end
end

require 'open-uri' 被注释掉后,问题再次出现:

Error: Facter: error while resolving custom fact "latest_gitversion": No such file or directory @ rb_sysopen - https://git-scm.com/downloads
Error: Facter: error while resolving custom fact "latest_packerversion": No such file or directory @ rb_sysopen - https://www.packer.io/downloads.html

目前尚不清楚是什么导致了这个问题。