Hey all,
I wanted to share a recent bug / fix we encountered yesterday. There was nothing anywhere using Google to try and research the bug, but updating the uglifier gem in our rails app fixed it.
Including Bootstrap.js from Bootstrap 3 resulted in the following error when precompiling assets:
% RAILS_ENV=production rake assets:precompile
/Users/mmoen/.rbenv/versions/1.9.3-p484/bin/ruby bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
TypeError: Cannot call method 'active' of undefined
(in /Users/mmoen/code/dojo4/gnerdl/app/assets/javascripts/application.js)
/Users/mmoen/code/dojo4/gnerdl/vendor/bundle/ruby/1.9.1/gems/execjs-1.4.0/lib/execjs/ruby_racer_runtime.rb:34:in `rescue in block in eval'
/Users/mmoen/code/dojo4/gnerdl/vendor/bundle/ruby/1.9.1/gems/execjs-1.4.0/lib/execjs/ruby_racer_runtime.rb:28:in `block in eval'
/Users/mmoen/code/dojo4/gnerdl/vendor/bundle/ruby/1.9.1/gems/execjs-1.4.0/lib/execjs/ruby_racer_runtime.rb:80:in `block in lock'
/Users/mmoen/code/dojo4/gnerdl/vendor/bundle/ruby/1.9.1/gems/therubyracer-0.10.1/lib/v8/c/locker.rb:13:in `Locker'
When we substituted bootstrap3 with bootstrap 2.3.2's js, compilation & minification worked.
We upgraded uglifier from 1.2.6 to 2.4.0 and minifying with bootstrap 3 worked.
I was wondering if anyone had any insight into this, knows what fix in uglifier fixed this, or had seen this before? I'd like to know more about why it was blowing up.
Thanks!
-- Miles