title: Google Chart: Data column(s) for axis #0 cannot be of type string
body: <p>I'm having a really weird problem with a Google Chart that I'm displaying on my webpage. When I run the code locally on my Mac, everything works, and the graph displays with no error. </p>
  
  <p>However, when I run the same app on the AWS server I'm testing with, I get the following error message and no graph:</p>
  
  <pre><code>Data column(s) for axis #0 cannot be of type string
  </code></pre>
  
  <p>The app is written in ruby-on-rails, and the relevant code is pasted below:</p>
  
  <p><strong>(In the page's controller)</strong></p>
  
  <pre><code>relevantEntries = getDataFromDB
  @graphData = Array.new
  @graphData &lt;&lt; ["Date", "Value"]
  relevantEntries.each do |entry|
    @graphData &lt;&lt; [entry.created.strftime(format="%-m/%-d"), entry.value]
  end
  </code></pre>
  
  <p><strong>(In the page's view)</strong>
      </p>
  
  <pre><code>  google.load('visualization', '1.0', {'packages':['corechart']});
    google.setOnLoadCallback(ChartMaker);
  
    function ChartMaker(chartDiv) {
      // Create the data table.
      var data = google.visualization.arrayToDataTable(&lt;%= @graphData.to_json.html_safe %&gt;);
      // Set chart options
      var options = {/* some options */};
      // Instantiate and draw chart, passing in the options.
      var chart = new google.visualization.LineChart(document.getElementById(chartDiv));
      chart.draw(data, options);
    }
  
  &lt;/script&gt;
  </code></pre>