Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dovadi opened this issue Apr 18, 2015 · 6 comments

Comments

@dovadi
Copy link

dovadi commented Apr 18, 2015

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)
@dovadi
Copy link
Author

dovadi commented Apr 18, 2015

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

@CloCkWeRX
Copy link

26c235d or similar may fix this

@vinzen
Copy link

vinzen commented Jan 8, 2016

Same issue here

@bechampion
Copy link

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.

@solarkennedy
Copy link

@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)

@Kungergely
Copy link

Kungergely commented Mar 8, 2017

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants