我正在尝试在Windows计算机上使用chef安装应用程序。我正在使用windows烹饪书。这是食谱。
windows_package 'MyInstaller' do
source 'C:/ChefRepo/setup.exe'
options '-ms'
installer_type :custom
action :install
end
运行chef-client –z –o testcookbook
Running handlers:
[2016-02-20T15:40:47+05:30] ERROR: Running exception handlers
Running handlers complete
[2016-02-20T15:40:47+05:30] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 01 minutes 29 seconds
[2016-02-20T15:40:47+05:30] FATAL: Stacktrace dumped to
C:/Users/myusername/.chef/local-mode-cache/cache/chef-stacktrace.out
[2016-02-20T15:40:47+05:30] FATAL: Encoding::UndefinedConversionError:
windows_package[MyInstaller] (testcookbook::default line 10) had an error:
Encoding::UndefinedConversionError: U+2122 to IBM437 in conversion from UTF-
16LE to UTF-8 to IBM437
这是第10行
windows_package 'MyInstaller' do
以下是metadata.rb fie的内容。
name 'testcookbook'
maintainer 'YOUR_COMPANY_NAME'
maintainer_email 'YOUR_EMAIL'
license 'All rights reserved'
description 'Installs/Configures testcookbook'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.0'
depends 'windows'
为什么抱怨编码?谁能提供任何有用的建议来解决这个问题?