"Uncaught TypeError: undefined is not a function" error only happens in production -- not in development
javascript, jquery, ruby-on-rails
Solution
Line 10587 of all.zip.
* Date: Mon May 16 05:32:54 PDT 2011
*/"use strict",function(a,b,c){function z(b){
Change the , after the "use script" to a ; - Here the function def turned to be undefined due to a syntax problem.
Problem
A weird bug has cropped up, and we're a little stumped. The bug only appears in production -- not locally. Every time a web page loads, it generates the following JavaScript error: "Uncaught TypeError: undefined is not a function." The location for the code is in 3rd party code (i.e., Colorbox) which used to work fine before. We use jQuery and Rails. Could this be related to the order in which Rails merges files into one mega JS file? To reproduce and see the error, visit www.panabee.com. View the error in Firebug or in Chrome's Developer Tools. The error will crop up on the home page (awesome first impression). Thanks for any help!