Bug #15111
closed
"!ruby/string:HighLine::String" in answers when using interactive mode
Added by Anonymous almost 9 years ago.
Updated almost 9 years ago.
Description
I'm in the process of migrating to Puppet4, so after installing puppet-agent, I deleted my old answers file, ran "foreman-installer -i", edited some values and ran the installer. It failed because some edited values had a "!ruby/string:HighLine::String " prefix, see:
/etc/foreman-installer/scenarios.d/foreman-answers.yaml:
db_host: !ruby/string:HighLine::String marduk.kvedulv.de
db_password: !ruby/string:HighLine::String xxx
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
Which version of HighLine do you have installed? I can't reproduce it under 1.7.8.
1.6.21 from Debian/jessie. I think at least on one string I did use the backspace key, maybe that's a problem?
Thanks, I can reproduce it now on that version and have a simple fix for it. I am seeing an issue with the YAML file where these strings are being base64-encoded, but not decoded - are your strings encoded too?
e.g.
2.0.0-p247 :021 > YAML.load([HighLine::String.new("test")].to_yaml)
=> ["dGVzdA=="]
$ cat config/answers.yaml
---
test2:
foo: !ruby/string:HighLine::String |-
ZXhhbXBsZQ==
I don't think so... the two lines in my example were pasted straight from the answers file.
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/kafo/pull/156 added
I switched from Ruby 2.0.0-p247 to 2.1.5 and the Base64 issue went away, so must be some interaction between Ruby/HighLine versions, so some separate issue (which updating Ruby or HighLine fixes).
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Related to Bug #16830: HighLine::String inside arrays not replaced in parameter values added
Also available in: Atom
PDF