Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set encoding for write pipe #364

Merged
merged 2 commits into from Jul 26, 2021
Merged

Conversation

@ngan
Copy link
Contributor

@ngan ngan commented Jul 26, 2021

This fixes the Encoding::UndefinedConversionError error for Rails applications. Rails sets the default encoding to UTF8: https://github.com/rails/rails/blob/main/railties/lib/rails.rb#L22-L23

We want to set it to Binary but the IO.pipe method only sets it for the reader, not the writer.

This fixes #243.

ngan added 2 commits Jul 26, 2021
This fixes the `Encoding::UndefinedConversionError` error for Rails
applications. Rails sets the default encoding to UTF8:
https://github.com/rails/rails/blob/main/railties/lib/rails.rb#L22-L23

We want to set it to Binary but the IO.pipe method only sets it for the
reader, not the writer.
@ngan
Copy link
Contributor Author

@ngan ngan commented Jul 26, 2021

@casperisfine
Copy link
Contributor

@casperisfine casperisfine commented Jul 26, 2021

Hum, CI is failing but for a totally unrelated reason (likely load order). I'll fix it on master.

@casperisfine casperisfine merged commit 6c89cf9 into Shopify:master Jul 26, 2021
3 of 13 checks passed
@casperisfine
Copy link
Contributor

@casperisfine casperisfine commented Jul 26, 2021

And thank you!

@ngan ngan deleted the fix-encoding-for-rails-apps branch Jul 26, 2021
@shopify-shipit shopify-shipit bot deployed to rubygems Jul 26, 2021 Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants