Sto riproducendo un grafico utilizzando highstock sull'applicazione rails su un file index.html.erb, tuttavia quando provo a caricare il grafico, viene visualizzato il seguente errore sulla console firebug,ReferenceError: HighCharts non definito
ReferenceError: HighCharts is not defined
new HighCharts.Chart({
il mio file index.html.erb è la seguente
<div id="quotes_chart", style="width=560px; height:300px;">
<script>
$(function(){
new HighCharts.Chart({
chart : {
renderTo: "quotes_chart"
},
title : {
text: "Daily trades"
},
xAxis : {
type: "datetime"
},
yAxis : {
title: {
text: "Shillings"
}
},
tooltip : {
formatter: function(){
return HighCharts.dateFormat("%B %e, %Y", this.x) + ': ' + "Kshs" + Highcharts.numberFormat(this.y, 2);
}
},
series: [
<% { "Telecommunication" => StockQuote.telecomm, "Agriculture" => StockQuote.agric }.each do |name, prices|
%>
{
name: <%= name %>,
pointInterval: <%= 1.day * 1000 %>,
pointStart: <%= 2.weeks.ago.to_i * 1000 %>,
data: <%= (2.weeks.ago.to_date..Date.today).map { |date| StockQuote.price_on(date).to_f}.inspect%>
},
<% end %>
]
});
});
</script>
</div>
Nel mio application.html.erb è la seguente:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="components/highstock/highstock.js"></script>
<%= javascript_include_tag "jquery-1.11.0.min", "highcharts" %>
Nella cartella app assests/javascripts ho entrambi i file jquery-1.11.0.min.js e highcharts.js scaricati da highcharts.com
Cosa potrei fare di sbagliato?