Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obscure exception if last line of js file is a comment #1

Open
cgriego opened this issue Oct 22, 2009 · 5 comments
Open

Obscure exception if last line of js file is a comment #1

cgriego opened this issue Oct 22, 2009 · 5 comments

Comments

@cgriego
Copy link

cgriego commented Oct 22, 2009

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

@imkira
Copy link

imkira commented Nov 6, 2010

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.

@cgriego
Copy link
Author

cgriego commented Nov 6, 2010

I encountered this error with Ruby 1.8

@imkira
Copy link

imkira commented Nov 7, 2010

Ohhh.... that is not what I expected. Do you still have the full trace of the exception?

@hassanrehman
Copy link

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:inmynext'
vendor/plugins/bundle-fu/lib/bundle_fu/js_minimizer.rb:128:in action' vendor/plugins/bundle-fu/lib/bundle_fu/js_minimizer.rb:178:injsmin'
vendor/plugins/bundle-fu/lib/bundle_fu/js_minimizer.rb:212:in minimize_content' vendor/plugins/bundle-fu/lib/bundle_fu.rb:33:inbundle_js_files'
vendor/plugins/bundle-fu/lib/bundle_fu.rb:21:in bundle_files' vendor/plugins/bundle-fu/lib/bundle_fu.rb:11:ineach'
vendor/plugins/bundle-fu/lib/bundle_fu.rb:11:in bundle_files' vendor/plugins/bundle-fu/lib/bundle_fu.rb:28:inbundle_js_files'
vendor/plugins/bundle-fu/lib/bundle_fu.rb:118:in send' vendor/plugins/bundle-fu/lib/bundle_fu.rb:118:inbundle'
vendor/plugins/bundle-fu/lib/bundle_fu.rb:100:in each' vendor/plugins/bundle-fu/lib/bundle_fu.rb:100:inbundle'
app/views/layouts/partial_templates/_common_head_section.rhtml:45

@hsyn
Copy link

hsyn commented Jan 15, 2015

Thanks @imkira ! installing packr helped. Glad that you commented about it! saved me for sure some hours :) 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants