Reputation: 3284
I've deployed my app in production and precompiled the assets pipeline, so my application.js
contains everything.
while it was all working fine in development (where files were split) it's not working any more in production, and tooltips and everything don't work any more.
the only problem I'm seeing in chrome console is:
Uncaught TypeError: Cannot read property 'msie' of undefined
it mentions the line containing the error:
jquery.js:9789
although the application.js (precompiled) at line 9789 is blank, and in my source I don't include explicitly any source file called jquery.js
, as the jquery is included inside the application.js
.
I found that jquery_bbq may be the problem, in I run: grep -r msie *
I have only two occurrences:
config/recipes/templates/nginx_configuration.erb
vendor/assets/javascripts/jquery_ba-bbq.min.js
I'm not sure how to troubleshoot this, any ideas ?
thanks in advance
Upvotes: 0
Views: 604
Reputation: 1074178
Something you're including is trying to read the msie
property of jQuery.browser
. But jQuery doesn't have the jQuery.browser
symbol any more (it was deprecated in v1.3 and removed in v1.9).
I can't account for the line number other than to mention that jQuery 1.10.2, un-minified, has exactly that many lines. As for the filename, I assume your HTML or something in your application.js
or another script you're loading is loading jquery.js
. Chrome's Network tab in the dev tools should tell you what's loading jquery.js
.
So the solution is to find out what plug-in or similar you're using that's trying to use jQuery.browser.msie
(or $.browser.msie
) and deal with the fact it's no longer compatible with jQuery. You've already basically done that and found jquery_ba-bbq.min.js
The other thing is to find and deal with whatever's including jquery.js
, if you have jQuery baked into your application.js
(presumably an older version, if this was working before you combined things).
Upvotes: 3