Not sure what you are doing but there a few glaring issues like @settings_value_hash
is not defined it would be settings_value_hash
piped variable not instance variable. @{settings_value_hash['machines']}
is in correct as well what happens if you run this
<% @settings.each do |settings_key, settings_value_hash| %>
<%= "#{settings_value_hash['ip']}:#{settings_value_hash['port']}" %>
option
<% settings_value_hash['option'].each do |option| %>
<%= option %>
<% end %>
<% settings_value_hash['machines'].each do |machine_key, machine_value_hash| %>
server <%= "#{machine_key} #{machine_value_hash['ip']}:#{machine_value_hash['port']}" %>
<% end %>
<% end %>
Also why is your initial hash set to a global $settings
but you are accessing it through an instance variable @settings
.