Describe the bug
We upgraded our Rails app from puma v3.12.6 to v5.2.2 and found that our CSV exports throw error:
Encoding::CompatibilityError: incompatible character encodings: US-ASCII and UTF-16LE
We progressively downgraded puma and found that v5.0.2 works but v5.0.3 exhibits the error.
Puma config:
Default config from rails new
To Reproduce
This is a clean Rails 6.1 app with only the controller action added in app/controllers/application_controller.rb and the puma version locked to v5.0.3. If you change puma to v5.0.2 the controller action works fine.
https://github.com/jboler/puma_bug
Desktop:
- OS: MacOS 10.15.7 or Ubuntu 20.04
- Puma Version >= 5.0.3
- Ruby 2.7.2
Describe the bug
We upgraded our Rails app from puma v3.12.6 to v5.2.2 and found that our CSV exports throw error:
We progressively downgraded puma and found that v5.0.2 works but v5.0.3 exhibits the error.
Puma config:
Default config from
rails newTo Reproduce
This is a clean Rails 6.1 app with only the controller action added in
app/controllers/application_controller.rband the puma version locked to v5.0.3. If you change puma to v5.0.2 the controller action works fine.https://github.com/jboler/puma_bug
Desktop: