Rails import external javascript API and set the order of the loads the javascript