Skip to content

Default Gemfile (Puppet 3.8) not Ruby 2.2 Compatible #122

@big-samantha

Description

@big-samantha

When creating a new module with p-m-s, out of the box the Gemfile is broken for Ruby 2.2.

This is because Puppet 3.x attempts to call Psck in a bunch of cases, but Psyk is totally gone (e.g. you can't require 'psyk' anymore) in Ruby 2.2 and newer.

LOLcalhost :: Working/Misc/puppet ‹master› % gco 3.8.7
Note: checking out '3.8.7'.
LOLcalhost :: Working/Misc/puppet ‹74c9754› % grep -ri -E 'require.*syck.*' ./
./lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:require "safe_yaml/syck_hack" if defined?(JRUBY_VERSION)
./lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:    require "safe_yaml/syck_resolver"
./lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:    require "safe_yaml/syck_node_monkeypatch"
./lib/puppet/vendor/safe_yaml/README.md:SafeYAML requires Ruby 1.8.7 or newer and works with both [Syck](http://www.ruby-doc.org/stdlib-1.8.7/libdoc/yaml/rdoc/YAML.html) and [Psych](http://github.com/tenderlove/psych).
./lib/puppet/vendor/safe_yaml/spec/syck_resolver_spec.rb:  require "safe_yaml/syck_resolver"

Maybe default to Puppet 4 at this point, and people can adjust the Gemfile if they need to move to an older Puppet? E.g. you'll need to use an older Ruby as well.

Or, if defaulting to 4 isn't sane, maybe some guidance in the README around this issue? I'd be happy to contribute it if you think that's the better approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions