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

Kernel parameters errors #124

Closed
jasonmead opened this issue Jun 23, 2014 · 4 comments

Comments

@jasonmead
Copy link

commented Jun 23, 2014

==> default: Recipe Compile Error in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/rabbitmq/recipes/default.rb
==> default: ================================================================================
==> default:
==> default:
==> default: NoMethodError
==> default: -------------
==> default: undefined method each_pair' for []:Array ==> default: ==> default: ==> default: Cookbook Trace: ==> default: --------------- ==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/rabbitmq/libraries/default.rb:38:informat_kernel_parameters'
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/rabbitmq/recipes/default.rb:163:in from_file' ==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/rabbitmq/recipes/default.rb:157:infrom_file'
==> default:
==> default:
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/rabbitmq/libraries/default.rb:
==> default:
==> default: 31: kernel.delete(:inet_dist_use_interface)
==> default: 32:
==> default: 33: # Otherwise, we can just render it nicely as Erlang wants. This
==> default: 34: # theoretically opens the door for arbitrary kernel_app parameters to be
==> default: 35: # declared.
==> default: 36:
==> default: 37: puts kernel.select { |k, v| !v.nil? }
==> default: 38>> kernel.select { |k, v| !v.nil? }.each_pair do |param, val|
==> default: 39: rendered << "{#{param}, #{val}}"
==> default: 40: end
==> default: 41:
==> default: 42: rendered.each { |r| r.prepend(' ') }.join(",\n")
==> default: 43: end
==> default: 44: end
==> default: 45: end
==> default: 46:
==> default:

Trying to get Rabbit installed in vagrant CentOs using chef. Using default recipe. Any help would be appreciated.

@LiamK

This comment has been minimized.

Copy link

commented Aug 7, 2014

Jason,
I'm running into the same error. Did you solve this?
It seems to be okay on EC2, but when I use auto-scaling it breaks.
Liam

@kirkbackus

This comment has been minimized.

Copy link

commented Jan 21, 2015

If you want to fix it yourself, you can change lines 37 - 40 to this

kernel.select { |_k, v| !v.nil? }.each { |param, val|
    rendered << "{#{param}, #{val}}"
}

kernel is an associative array (aka. hash in ruby), and they are iterating over it incorrectly.

It should look like this

https://github.com/kirkbackus/rabbitmq/blob/master/libraries/default.rb

@cmluciano

This comment has been minimized.

Copy link
Collaborator

commented Mar 2, 2015

@jasonmead Did you get this resolved?

@cmluciano

This comment has been minimized.

Copy link
Collaborator

commented Mar 17, 2015

Closing due to inactivity

@cmluciano cmluciano closed this Mar 17, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.