Skip to content

fix: add base64 gem dependency for Ruby 3.3+ compatibility#2108

Open
wasim-builds wants to merge 3 commits into
Shopify:mainfrom
wasim-builds:fix/add-base64-dependency
Open

fix: add base64 gem dependency for Ruby 3.3+ compatibility#2108
wasim-builds wants to merge 3 commits into
Shopify:mainfrom
wasim-builds:fix/add-base64-dependency

Conversation

@wasim-builds

@wasim-builds wasim-builds commented Jul 23, 2026

Copy link
Copy Markdown

Summary

Adds the base64 gem as an explicit dependency in liquid.gemspec.

Problem

The base64 gem was loaded from the standard library in Ruby 3.3, producing this deprecation warning:

warning: base64 was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile or gemspec.

Starting with Ruby 3.4, the base64 gem is no longer part of the default gems, meaning require 'base64' will raise a LoadError unless the gem is explicitly depended on.

This is the second half of the fix for #1772 -- the bigdecimal dependency was already added previously.

Changes

  • liquid.gemspec: Added s.add_dependency("base64")

Testing

This is a gemspec-level dependency declaration change. No code logic is modified, so existing tests continue to pass. The fix ensures that require 'base64' in lib/liquid/standardfilters.rb works without deprecation warnings on Ruby 3.3+ and without errors on Ruby 3.4+.

The base64 gem is no longer part of the default gems since Ruby 3.4.0.
Without an explicit dependency, requiring it on Ruby 3.3+ produces a
deprecation warning, and on Ruby 3.4+ it will raise a LoadError.

The bigdecimal gem was already added as a dependency to address the same
issue; this adds base64 to complete the fix for Shopify#1772.
@wasim-builds

Copy link
Copy Markdown
Author

I have signed the CLA!

@wasim-builds

Copy link
Copy Markdown
Author

By the way, I've really been enjoying contributing to this project! My goal is to get more involved in open source to help maintain projects and learn from great engineering teams. Is there a process or pathway for becoming a member of the Shopify GitHub organization? I'd love to continue helping out where I can!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant