Chef infra 使用Windows Cookbook时未定义转换器错误
我正在尝试在Windows计算机上使用chef安装应用程序。我正在使用windows烹饪手册。这是菜谱Chef infra 使用Windows Cookbook时未定义转换器错误,chef-infra,Chef Infra,我正在尝试在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-0
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'
为什么它在抱怨编码?有人能给出一些有用的建议来解决这个问题吗 尝试更改您的源路径-source'C:\\ChefRepo\\setup.exe'我尝试过,但没有成功,这是我得到的错误。Encoding::Unde finedConversionError:U+2122到IBM437正在从UTF-16LE到UTF-8到IBM437的转换中。请尝试使用反斜杠更改路径,并删除我尝试过的安装程序类型,但没有成功。我也犯了同样的错误。从UTF-16LE转换为UTF-8再转换为IBM437时,U+2122转换为IBM437。