Closed SamyCoenen closed 7 years ago
solved it with export RUBYOPT="-KU -E utf-8:utf-8"
@SamyCoenen: thanks for the report and glad to see you fixed it! In case anyone else hits this, do you have any idea why that was needed for you?
Yes, this forces Ruby to use UTF-8 encoding. It might have something to do with my Ruby version:
in Ruby 1.9 the default is ASCII
in Ruby 2.0 the default is UTF-8.
When I do ruby -v I get this: ruby: warning: -K is specified; it is for 1.8 compatibility and may cause odd behavior ruby 2.1.9p490 (2016-03-30 revision 54437) [x86_64-linux]
Interesting, I've not seen that before. Thanks for the extra information!
This is my error log:
<abs/code/environments/production/modules# generate-puppetfile -p ./Puppetfile
Installing modules. This may take a few minutes.
/opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/generate-puppetfile-0.10.0/lib/generate_puppetfile/bin.rb:222:in'
gsub!': invalid byte sequence in US-ASCII (ArgumentError) from /opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/generate-puppetfile-0.10.0/lib/generate_puppetfile/bin.rb:222:in
generate_module_data' from /opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/generate-puppetfile-0.10.0/lib/generate_puppetfile/bin.rb:85:inrun' from /opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/generate-puppetfile-0.10.0/bin/generate-puppetfile:6:in
<top (required)>' from /opt/puppetlabs/puppet/bin/generate-puppetfile:23:inload' from /opt/puppetlabs/puppet/bin/generate-puppetfile:23:in
I've tried:
export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 export LC_ALL=en_US.UTF-8
But the same issue remains.
The puppetfile should be fine because it works fine when executing with r10k: <ppetlabs/code/environments/production# r10k puppetfile install --verbose
INFO -> Updating module /etc/puppetlabs/code/environments/production/modules/zabbix INFO -> Updating module /etc/puppetlabs/code/environments/production/modules/chocolatey INFO -> Updating module /etc/puppetlabs/code/environments/production/modules/stdlib INFO -> Updating module /etc/puppetlabs/code/environments/production/modules/powershell INFO -> Updating module /etc/puppetlabs/code/environments/production/modules/windows_env