Normally you can order your js files in the application.js via require for example.
So if you need to load some javascript after some other javascript has been loaded, split your js code in different files and load the files in the order you want them to be.
Maybe this Link helps: http://guides.rubyonrails.org/asset_pipeline.html There is a section "2.2 Asset Organization" which might be useful for you.