Icaro Icaro - 1 year ago 73
jQuery Question

How to put Jquery minified in Rails4 with jquery-rails gem?

i'am trying to create a super lightweight page with rails, and the jquery-rails gem wont put the minify version of jquery on final js file.

i've tryed to change my

to have
//=requry jquery.min
and other variations but nothing work.

this is my final js after compile (with jquery not minifyed):

* jQuery JavaScript Library v1.11.2
* http://jquery.com/
* Includes Sizzle
"function"!=typeof Object.create&&(Object.create=function(t){function e(){}...

Answer Source

Actually the Jquery is minified the problem is the Jquery is not minified by uglyfier, the Jquery-rails gem source is already minified but have a simple header commented wich causes some tools like the PageSpeedInsights won't recognize as minified.

so i've made this mistake sorry about that.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download