bundle-fu
bundle-fu copied to clipboard
Obscure exception if last line of js file is a comment
If the last line of a JavaScript file is a comment, bundle_fu fails to generate the cache file and throws an obscure exception.
Exception message: comparison of Fixnum with String failed
This issue is 1year old, but anyway I will post a comment about it. I was having the same problem some minutes ago, and I noticed this happens because of a minor incompatibility with Ruby 1.9.x in Bundle-fu's own JSMinimizer code. An easy workaround would be installing Packr (gem install packr), as bundle-fu will detect this package as installed and use Packr's compression code.
I encountered this error with Ruby 1.8
Ohhh.... that is not what I expected. Do you still have the full trace of the exception?
i'm facing the same issue .. with ruby 1.8.7 and rails 2.2.2
here's the trace
vendor/plugins/bundle-fu/lib/bundle_fu/js_minimizer.rb:79:in <=' vendor/plugins/bundle-fu/lib/bundle_fu/js_minimizer.rb:79:in
mynext'
vendor/plugins/bundle-fu/lib/bundle_fu/js_minimizer.rb:128:in action' vendor/plugins/bundle-fu/lib/bundle_fu/js_minimizer.rb:178:in
jsmin'
vendor/plugins/bundle-fu/lib/bundle_fu/js_minimizer.rb:212:in minimize_content' vendor/plugins/bundle-fu/lib/bundle_fu.rb:33:in
bundle_js_files'
vendor/plugins/bundle-fu/lib/bundle_fu.rb:21:in bundle_files' vendor/plugins/bundle-fu/lib/bundle_fu.rb:11:in
each'
vendor/plugins/bundle-fu/lib/bundle_fu.rb:11:in bundle_files' vendor/plugins/bundle-fu/lib/bundle_fu.rb:28:in
bundle_js_files'
vendor/plugins/bundle-fu/lib/bundle_fu.rb:118:in send' vendor/plugins/bundle-fu/lib/bundle_fu.rb:118:in
bundle'
vendor/plugins/bundle-fu/lib/bundle_fu.rb:100:in each' vendor/plugins/bundle-fu/lib/bundle_fu.rb:100:in
bundle'
app/views/layouts/partial_templates/_common_head_section.rhtml:45
Thanks @imkira ! installing packr helped. Glad that you commented about it! saved me for sure some hours :) :+1: