You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<% if @save_db_to_disk %>
<%- @save_db_to_disk_interval.sort_by{}.each do |seconds, key_change| -%>
save <%= seconds -%> <%= key_change -%> <%= "\n" -%>
<%- end -%>
<% end %>
This throws up an error under our version of Ruby (1.8.7):
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Function Call, Failed to parse template redis/redis.conf.erb:
Filepath: /etc/puppet/environments/development/modules/redis/templates/redis.conf.erb
Line: 117
Detail: undefined method `<=>' for nil:NilClass
at /etc/puppet/environments/development/modules/redis/manifests/config.pp:92:18 on node xmdrdb01.smxemail.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
The solution is to specify what to sort by, then it will correctly run:
<% if @save_db_to_disk %>
<%- @save_db_to_disk_interval.sort_by{|k,v|k}.each do |seconds, key_change| -%>
save <%= seconds -%> <%= key_change -%> <%= "\n" -%>
<%- end -%>
<% end %>
In the meantime, we have reverted to v1.2.3 which runs as expected and provides the features we currently use.
The text was updated successfully, but these errors were encountered:
@sshipway Can you open a PR to the repo with that change?
I'm assuming this is on CentOS 6? 1.8.7 is EOL. I'd recomend using the Puppet 4+ agent as it comes with it's own Ruby packaged in, so won't have Ruby version issues.
Yes, this is Centos 6 with Puppet 3. We have a project running to upgrade to Centos 7 and bring everything up to Puppet 4, but this will take much time before it is approved and finalised. In the meantime, we (and many like us) will continue to be using Centos6/Pupet3 etc I suspect.
I don't have a separate repo with a change, sorry; it's only 6 chars and we're using the official 1.2.3 tag. I'll see what I can do...
In version 1.2.4, the template has:
This throws up an error under our version of Ruby (1.8.7):
The solution is to specify what to sort by, then it will correctly run:
In the meantime, we have reverted to v1.2.3 which runs as expected and provides the features we currently use.
The text was updated successfully, but these errors were encountered: