If some of your JavaScripts fail on Internet Explorer, but only in staging or production environments, chances are that JavaScript compression is the culprit.
By default, Rails 3.2 compresses JavaScript with UglifyJS. I have seen a few cases where this actually breaks functioning JavaScript on IE (one example is the CKEditor Show archive.org snapshot ).
I fixed this by switching to Yahoo's YUI Compressor Show archive.org snapshot .
To do this, do the following:
-
replace the
uglifier
gem with theyui-compressor
gem in yourGemfile
-
add this line to your
application.rb
:config.assets.js_compressor = :yui
Posted by Tobias Kraze to makandra dev (2012-09-26 16:36)