Doug Smith
Doug Smith

Reputation: 143

Highcharts in the Rails Assest Pipeline not Loading

I'm working in development and am migrating from Rails 3.x to Rails 4.2.5 with Ruby 2.1. In the previous version of rails, Highcharts was working perfectly. Now I am trying to use the asset pipeline for the first time.

Within my applcation.html.erb file, I have included the line:

  <%= javascript_include_tag "application" %>

Within assets/javascripts, I've verified the file "application.js" exists. Within that file I have included the lines:

 //= require jquery.min
 //= require rails
 //= require highcharts
 //= require_tree .

I have verified the files just listed above also exist in the asset/javascript. I thought that was all I needed, but I always get a blank screen when I try to display the chart. The log file says the view with the chart was rendered, but nothing is displayed. It worked perfectly in the previous version of rails, so I am ruling out the creation, handling and data values of the chart as being the source of the problem.

So what else am I missing to get Highcharts to run again? If more info is needed to help answer the question, please just let me know. Any help is greatly appreciated.

Upvotes: 0

Views: 111

Answers (1)

Doug Smith
Doug Smith

Reputation: 143

Problem solved. There was an extra comma buried within my Highcharts function call. I was able to find this by using @taglia comments about using a browser console, which in the future I will know to use as part of my debugging tool box.

Thanks to everyone for your help and insights.

Upvotes: 1

Related Questions