[chef] invalid multibyte char (US-ASCII) in template file


Chronological Thread 
  • From: "Davis, Bruce" < >
  • To: " " < >
  • Subject: [chef] invalid multibyte char (US-ASCII) in template file
  • Date: Thu, 8 Aug 2013 00:04:03 +0000
  • Accept-language: en-US

I'm trying to upload a template containing a sql dump: file.sql.erb

Since this is a sql dump, I cannot add the usual workaround to the top of the 
file
# encoding: utf-8

My locale is set correctly:
$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"

However, when I try to upload the cookbook, I get:

$ knife cookbook upload <cookbook_name>
Uploading <cookbook_name> [0.0.1]
FATAL: Erb template templates/default/file.sql.erb has a syntax error:
FATAL: -:75: invalid multibyte char (US-ASCII)
FATAL: -:1: invalid multibyte char (US-ASCII)
FATAL: -:1: syntax error, unexpected $end
FATAL: ...hese brave men foughtd diedr freedom.\\",\\"audio\\":{...
FATAL: ...                               ^

Please help.

Thank you.

Bruce Davis




Archive powered by MHonArc 2.6.16.

§