You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.
I had problem with the error Uncaught Highcharts error #16 saying that Hightcharts was loaded twice.
I did not understand as I followed recommended settings in Highcharts-rails ReadMe.
My application is using Rails 3.2.21.
More explanation about my debug can be found here.
Finally, I found that there is a bug in rails when you do a rake assets:precompile that would lead to include twice the Javascript code from app/assets and public/assets.
This bug is referenced here since april 2013, but the rails community don't seem to be willing to correct it.
As workaround I just :
run rake assets:clean
add the line //= require highcharts to app/assets/javascripts/application.js
run rake assets:precompile
deleted the line //= require highcharts from app/assets/javascripts/application.js
So Highchart library is precompiled in assets pipeline from the public/assets.
Its a bit weird, but it works... in development...
I still have to test it in production to confirm that it continues to work.
Maybe it would be a good idea to warn in the Highcharts-rails ReadMe file that including Highcharts in the app/assets/javascript/application.js file could potentialy lead to the error #16 ?
The text was updated successfully, but these errors were encountered:
@bluebird-communication is this still a problem? It's quite old, so I'm guessing (hoping) something probably changed, either in Rails or in Highcharts that makes this disappear
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I had problem with the error Uncaught Highcharts error #16 saying that Hightcharts was loaded twice.
I did not understand as I followed recommended settings in Highcharts-rails ReadMe.
My application is using Rails 3.2.21.
More explanation about my debug can be found here.
Finally, I found that there is a bug in rails when you do a
rake assets:precompile
that would lead to include twice the Javascript code from app/assets and public/assets.This bug is referenced here since april 2013, but the rails community don't seem to be willing to correct it.
As workaround I just :
rake assets:clean
//= require highcharts
to app/assets/javascripts/application.jsrake assets:precompile
//= require highcharts
from app/assets/javascripts/application.jsSo Highchart library is precompiled in assets pipeline from the public/assets.
Its a bit weird, but it works... in development...
I still have to test it in production to confirm that it continues to work.
Maybe it would be a good idea to warn in the Highcharts-rails ReadMe file that including Highcharts in the app/assets/javascript/application.js file could potentialy lead to the error #16 ?
The text was updated successfully, but these errors were encountered: