On Thu, Jul 28, 2011 at 11:34 PM, David Schmitt <da...@dasz.at> wrote: > I tried to login to redmine with openid, but just got an "internal error". > > Here's the report: > > When having unresolved parameter collisions in the dashboard, > lib/node_group_graph throws and error: > >> ActionView::TemplateError (undefined method `first' for #<Set: >> {#<NodeGroup id:6, name:"GROUPNANE">}>) on line #4 of >> app/views/shared/_parameters.html.haml: >> 1: .section >> 2: %h3 Parameters >> 3: - # Conflicting parameters are okay here, since we just want to warn >> 4: - unless resource.compiled_parameters(true).empty? >> 5: - if resource.errors.on(:parameters) >> 6: %p.error >> 7: %strong Warning: >> >> lib/node_group_graph.rb:98:in `compiled_parameters' >> lib/node_group_graph.rb:95:in `each' >> lib/node_group_graph.rb:95:in `compiled_parameters' >> lib/node_group_graph.rb:133:in `yield_children' >> lib/node_group_graph.rb:137:in `walk' >> lib/node_group_graph.rb:120:in `walk_parent_groups' >> lib/node_group_graph.rb:83:in `compiled_parameters' > > > The fix is to do this: > >> source = nil >> parameter.sources.each { |s| source ||= s } >> inherited[parameter.name].sources << source > > instead of this: > >> inherited[parameter.name].sources << parameter.sources.first > > > With the fix, the dashboard correctly displays the conflict error at the top > of the node's page. > > > The dashboard is running on Scientific Linux 5, a RHEL5 clone, with ruby > 1.8.5(?). But I don't think that is relevant, I couldn't find Set.first in > 1.9's docs. >
Actually, this is indeed the problem. Set includes Enumerable, and Enumerable#first is not available in Ruby 1.8.5. Dashboard is only supported (and tested) on Ruby 1.8.7, as of this release. > > > Best Regards, David -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.