I developed and automated deployment script for Ruby. However, when I try to run it I stumble upon this error:
deploy.rb:86:in `gsub': incompatible encoding regexp match (UTF-8 regexp with CP850 string) (Encoding::CompatibilityError).
The line of code it refers to is:
new_content = new_content.gsub(/£ {{(.*)}}/) { |match| "{{"+match.tr('£ {{}}', '')+"}} €" }
Any ideas on what is causing this issue and how to solve it?
new_contentis Windows CP850. Where doesnew_contentcome from?new_content? Can you provide a minimal reproducible example? How can I reproduce your problem?