dtao/safe_yaml

uninitialized constant Syck (NameError) after update from Ruby 2.1.6 to Ruby 2.2.2

dovadi opened this issue · 6 comments

I encountered the follow error after updating to Ruby 2.2.2. No problems with Ruby 2.1.6

/ruby-2.2.2/gems/safe_yaml-0.9.7/lib/safe_yaml/syck_node_monkeypatch.rb:42:in `<top (required)>': uninitialized constant Syck (NameError)

Ah found out what the problem is, see http://ruby-doc.org/stdlib-2.2.2/libdoc/yaml/rdoc/YAML.html.

Syck was the original for YAML implementation in Ruby’s standard library developed by why the lucky stiff.

You can still use Syck, if you prefer, for parsing and emitting YAML, but you must install the ‘syck’ gem now in order to use it.

In older Ruby versions, ie. <= 1.9, Syck is still provided, however it was completely removed with the release of Ruby 2.0.0.

So you now have to install the Syck gem

26c235d or similar may fix this

Same issue here

the fix mentioned by CloCkWeRX works ... the problem is that I think most of us are struggling with the safe_yaml version that comes inside vendor on the puppet gem.

@bechampion can you link or reference the vendor'd puppet safe_yaml thing? (so I can know more about the technical reason why I'm hitting this)

@bechampion Yes, I can confirm that the fix mentioned by @CloCkWeRX works for me as well when I apply it to the safe_yaml version shipped with the puppet gem.

@solarkennedy This is the affected file in the default installation path (Puppet installed from the official Ubuntu repository, OS version 16.04): /usr/lib/ruby/vendor_ruby/puppet/vendor/safe_yaml/lib/safe_yaml.rb
When I applied to it the patch mentioned by @CloCkWeRX, the nasty errors in my syslog pertaining to Puppet (namely "puppet[6750]: /usr/lib/ruby/vendor_ruby/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb:42:in `<top (required)>': uninitialized constant Syck (NameError)") have miraculously disappeared and puppet started working again.
Oh and this all happened after an OS upgrade from Ubuntu 14.04 to 16.04.