-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Summary
On Ruby 3.4+, base64 is no longer a default stdlib; it’s a bundled gem. The telesign gem does require "base64" in lib/telesign/rest.rb but doesn’t declare base64 as a runtime dependency. This causes LoadError when using telesignenterprise on Ruby 3.4.
Affected
telesignenterprise≥ 2.2.x (observed 2.2.2, 2.5.0, 2.6.0)telesign(observed 2.2.5, 2.3.1, 2.4.0)
Steps to Reproduce
# Ruby 3.4.x
ruby -v # => ruby 3.4.0...
# Minimal Gemfile
cat > Gemfile <<'G'
source "https://rubygems.org"
gem "telesignenterprise", "2.6.0" # also reproducible on 2.2.2 / 2.5.0
G
bundle install
bundle exec ruby -e 'require "telesignenterprise"; puts "loaded"'Actual Behavior
/.../gems/telesign-2.4.0/lib/telesign/rest.rb:4:in `<top (required)>':
cannot load such file -- base64 (LoadError)
Expected Behavior
Gem loads without requiring the application to manually add gem "base64".
Why this happens
From Ruby 3.4, base64 was moved out of the default set and distributed as a bundled gem. Libraries that require "base64" must declare a dependency on it.
Proposed Fix
Add a runtime dependency on base64 (ideally in telesign.gemspec, since that’s where the require "base64" lives):
# telesign.gemspec
+ spec.add_dependency "base64"If you prefer to patch on the enterprise wrapper as a stop-gap:
# telesignenterprise.gemspec
+ spec.add_dependency "base64"Workaround for users
Add to your app’s Gemfile:
gem "base64"Environment
- Ruby: 3.4.0 (arm64-darwin)
- Bundler: 2.x
- telesignenterprise: 2.6.0 (also 2.5.0 / 2.2.2)
- telesign: 2.4.0 (also 2.3.1 / 2.2.5)
Additional Notes
- The error originates in
telesign/lib/telesign/rest.rb(require "base64"). - Consider adding Ruby 3.4 to CI to catch bundled-stdlib regressions.