Skip to content

Conversation

@smortex
Copy link
Member

@smortex smortex commented Jan 5, 2026

When developing, you are intended to explicitly use bundler by running bundle exec exe/puppetserver-ca, not by running ./exe/puppetserver-ca and hoping for the bundle to be loaded for you.

Because this file is included as-is in the gem, when executed from the outside of a bundle, this result in an error:

$ /opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/openvoxserver-ca-3.0.0/exe/puppetserver-ca
/opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/openvoxserver-ca-3.0.0/exe/puppetserver-ca:6:in `<main>': private method `require' called for Bundler:Module (NoMethodError)

Bundler.require(:default)
       ^^^^^^^^

On an AIO installation, users are unlikely to hit this issue (given the complex path above). But on FreeBSD, this puppetserver-ca "entry point" is in the $PATH (maybe I should not install it), so easily found by users, which then expect it to work.

Original issue:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292171

When developing, you are intended to explicitly use bundler by running
`bundle exec exe/puppetserver-ca`, not by running `./exe/puppetserver-ca`
and hoping for the bundle to be loaded for you.

Because this file is included as-is in the gem, when executed from the
outside of a bundle, this result in an error:

```sh-session
$ /opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/openvoxserver-ca-3.0.0/exe/puppetserver-ca
/opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/openvoxserver-ca-3.0.0/exe/puppetserver-ca:6:in `<main>': private method `require' called for Bundler:Module (NoMethodError)

Bundler.require(:default)
       ^^^^^^^^
```

On an AIO installation, users are unlikely to hit this issue (given the
complex path above).  But on FreeBSD, this puppetserver-ca "entry point"
is in the $PATH (maybe I should not install it), so easily found by
users, which then expect it to work.
@smortex smortex added the bug Something isn't working label Jan 5, 2026
@bastelfreak bastelfreak merged commit 343976f into main Jan 5, 2026
12 checks passed
@bastelfreak bastelfreak deleted the fix-bogus-bundler-requirement branch January 5, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants