-
Notifications
You must be signed in to change notification settings - Fork 102
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
Ruby on Rails RedCloth issue when using Docker on Apple M1 hardware #66
Comments
I'm experiencing the same issue: irb(main):015:0> RedCloth.new("abc def ghi äöü xyz").to_html # or .to_latex
=> "<p>abc def ghi</p>" Only instead of inside a Docker container, this is in a virtual Debian Parallels box (also on an Apple M1 system) It works perfectly with the ruby on the Apple host itself, btw. |
@mo-nathan and @markusherzog a work around is to re-compile and install the gem from source.
Limited testing with some unicode characters seems to indicate that it works. e.g.
|
I see the same issue. We have recently upgraded our servers. The old servers render the text as expected, but the new servers are trimming the text at the occurrence of the first non-ASCII character. We used a third-party service for server management. So, we do not exactly know the difference between the packages installed in the older and newer servers. Both the machines run on Ubuntu 22.04. I tried installing Script: require 'redcloth'
puts RedCloth::EXTENSION_LANGUAGE
puts RedCloth.new("Hello 😀, there!").to_html Output on older machines:
Output on newer machines:
Any help here would be greatly appreciated. Thanks in advance! |
This is really intriguing! I've added all these scenarios here in a test app and they all don't cut. I will try to add these scenarios here in the CI for RedCloth and see how it goes. |
I have opened a new issue to address a specific problem where RedCloth fails to correctly render non-ASCII characters on arm64 architectures. For more details and to contribute to the discussion, please see Issue #91 |
When using the RedCloth gem under Ruby on Rails in a Docker container on an Apple M1 system, the string get truncated just before the first non-ascii character. The problem does not happen on an Apple Intel system or if Rails is run outside of Docker. This GitHub repo should reproduce the issue on any Apple M1 hardware:
https://github.com/mo-nathan/docker-test
I'm guessing it has something to do with how the standard Ruby Docker images are getting created for Apple M1s that triggering some bug in RedCloth. I've tried tracing the issue using a Ruby debugger, but haven't found any additional clues.
I've also posted this issue to Stackoverflow (https://stackoverflow.com/questions/72738254/ruby-on-rails-redcloth-issue-when-using-docker-on-apple-m1-hardware) and to the Ruby Docker GitHub issues page (docker-library/ruby#385).
The text was updated successfully, but these errors were encountered: