I had an inexplicable problem with my Rails application. I use a lot of JavaScript in all parts of the application. Everything works fine in development, but in production it seems that the code in my javascript views is not executing.
This is especially strange because all the other JavaScript on the page works just fine. Custom Tabs with JavaScript. Even my calendar is optional. The only things that don't work are remote links that start views ending in .js.coffee.
My webkit inspector returns this when a remote link is clicked: http://cl.ly/Ihyf
However, when viewing the response tab of this request, this shows nothing: http://cl.ly/Ihxs
In addition, the console does not show any errors. It is as if my new.js.coffee is just empty.
The called view contains some simple JavaScript to display modality:
$('#modal_container').html("<%=j render 'form' %>") $('#modal_container').modal()
In design mode, all views are loaded properly. I also used rake: assets: to recompile several times, but that didn't seem to help.
source share