I have been adding logs to the console to check the status of different variables without using the Firefox debugger.
However, in many places in which I add a
In my particular case I was rendering a Rails partial without render layout: false which was re-rendering the entire layout, including all of the scripts in the tag. Adding render layout: false to the controller action fixed the problem.
render layout: false