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
Encoding::CompatibilityError caused by non-latin characters in ERB template #481
Comments
Same issue here. Using a customized template with Rails default scaffold view generator:
|
Digging deeper, this looks like a regression. It looks like it broke starting with ruby 1.9.1 when IO.binread was introduced.
This
@sferik I am happy to write a test and patch for it, but I want to make sure I am not missing something and that there is a chance it will get pulled. |
Hi, I'm using Thor as generator in Rails. Some of my templates contain non-latin (cyrillic) characters, and it causes
template
method to fail. Here's the backtrace (I omitted some lines and shortened the paths):The reason must be that the template is read as ASCII-8BIT:
..as removing non-latin chars from the template fixes the issue (as well as changing
binread
toread
– I wonder why you had to usebinread
here).What's at fault here, Thor or ERB?
The text was updated successfully, but these errors were encountered: