I\'m pretty new to Javascript, Rails and JQuery all working together.
I\'m going through this tutorial (http://www.highcharts.com/documentation/how-to-use#installati
The problem is in the first line of source that is var charts;
remove it and you are done.
As we discussed in chat, there were a few missing pieces.
So, in short, you needed this in your layout:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="/javascripts/js/highcharts.js" type="text/javascript"></script> <!--where you put the high charts library -->
<script src="/highcharts.js" type="text/javascript"></script> <!-- your script -->
Now going forward (assuming you are working w/ rails 3.1+), I'd suggest moving your javascripts to a more conventional location. In 3.1, rails likes to see it in app/assets/javascripts
but public/javascripts
is still fine, just not exactly conventional.
You will get a lot of milage by understanding the rails helpers to insert script tags and the Asset Pipeline.
Good luck!
There is an issue with the Chart keyword. Please change like
new Highcharts.Chart({ Chart is with small c