I'm having an unexplainable issue with my Rails app. I'm using a lot of JavaScript in all parts of the app. In development everything is working just fine, but in production it seems that the code in my javascript views is not executed.
This is particularly odd because all other JavaScript on the page works great. Custom tabs with JavaScript work. Even my custom made calendar works as expected. The only things that do not work are remote links which trigger views ending with .js.coffee.
My webkit inspector returns this when clicking a remote link: http://cl.ly/Ihyf
However, when looking at the response tab of that request it shows me nothing: http://cl.ly/Ihxs
Furthermore, the console does not show any errors. It's as if my new.js.coffee is just empty.
The view that is being called contains some simple JavaScript to show a modal:
$('#modal_container').html("<%=j render 'form' %>")
$('#modal_container').modal()
In development mode, all views load properly. I also ran rake:assets:precompile multiple times, but that didn't seem to help.
You should move coffee-rails
gem from the :assets
group to the main group.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With