title: Undefined method `keys' for []:Array
body: <p>I'm getting a Undefined method error:</p>
  
  <p>undefined method `keys' for ["71", "74", "340", "75"]:Array</p>
  
  <p>I'm using Gruff with Prawn to insert an image graph, I have the bar graph displaying properly, but the undefined error is occurring on the label call.</p>
  
  <p>Using prawn (0.15.0) and gruff (0.5.1)</p>
  
  <p><strong>Prawn</strong></p>
  
  <pre><code>def initialize(result)
   super()
   @result = result
   show_graph
  end
  
  def show_graph
  lint = @result.map {|v| v.lint/227 } 
  g = Gruff::Bar.new('540x200')
  g.data(:lint, lint, '#00463f')
  @result.each_with_index do |v, i|
  g.labels = {i =&gt; v.variety.variety_name}
  end
  g.y_axis_label = 'Yield (bales/ha)'
  g.marker_font_size = 16
  g.marker_count = 5
  g.theme = {:marker_color =&gt; '#333333', :font_color =&gt; '#333333', :background_colors =&gt; %w(#ffffff #ffffff)}
  g.minimum_value = 0
  g.hide_legend = true
  
  g.write("#{Rails.root}/app/assets/images/chart.png")
  
  image "#{Rails.root}/app/assets/images/chart.png"
  </code></pre>
  
  <p>end      </p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>@result = Result.where('trial_id' =&gt; params[:trial_id]).order('lint DESC')
  </code></pre>