Compile Error when upgrading to 1.3.1 #82

davedkg opened this Issue Apr 27, 2012 · 13 comments

ActionView::Template::Error (no such file to load -- ["ok","(function() {\n\n $.Isotope.prototype._getCenteredMasonryColumns = function() {\n var colW, cols, parentWidth;\n this.width = this.element.width();\n parentWidth = this.element.parent().width();\n colW = this.options.masonry && this.options.masonry.columnWidth || this.$filteredAtoms.outerWidth(true) || parentWidth;\n cols = Math.floor(parentWidth / colW);\n cols = Math.max(cols, 1);\n this.masonry.cols = cols;\n return this.masonry.columnWidth = colW;\n };\n\n $.Isotope.prototype._masonryReset = function() {\n var i, _results;\n this.masonry = {};\n this._getCenteredMasonryColumns();\n i = this.masonry.cols;\n this.masonry.colYs = [];\n _results = [];\n while (i--) {\n _results.push(this.masonry.colYs.push(0));\n }\n return _results;\n };\n\n $.Isotope.prototype._masonryResizeChanged = function() {\n var prevColCount;\n prevColCount = this.masonry.cols;\n this._getCenteredMasonryColumns();\n return this.masonry.cols !== prevColCount;\n };\n\n $.Isotope.prototype._masonryGetContainerSize = function() {\n var i, unusedCols;\n unusedCols = 0;\n i = this.masonry.cols;\n while (--i) {\n if (this.masonry.colYs[i] !== 0) {\n break;\n }\n unusedCols++;\n }\n return {\n height: Math.max.apply(Math, this.masonry.colYs),\n width: (this.masonry.cols - unusedCols) * this.masonry.columnWidth\n };\n };\n\n}).call(this);\n"]

(in /Users/david/dev/ab/rails/dash/vendor/assets/javascripts/
11: = render 'layouts/footer'
13: // javascript
14: = javascript_include_tag :application
15: = yield :on_demand_script
17: // javascript widgets
app/views/layouts/application.html.haml:14:in `_app_views_layouts_application_html_haml___2587078288227510863_70214171044500'



ActionView::Template::Error (cannot load such file -- ["ok","(function() {\n\n $(document).read

Downgraded to 1.3.0 and everything back to normal.



I am having the same problem. Downgrading to 1.3.0 solved it for me.


I'm having the same issue and downgrading to 1.3.0 solved the problem.


Blerg. I'm throwing in my +1 as well. Rolling back to v1.3.0 solved it for me.

no such file to load -- ["ok","(function() {\n\n\n\n}).call(this);\n"]

For what it's worth, backtrace from tilt on up (top being top of call stack).

activesupport (3.1.3) lib/active_support/dependencies.rb:234:in `load'
activesupport (3.1.3) lib/active_support/dependencies.rb:234:in `block in load'
activesupport (3.1.3) lib/active_support/dependencies.rb:223:in `block in load_dependency'
activesupport (3.1.3) lib/active_support/dependencies.rb:640:in `new_constants_in'
activesupport (3.1.3) lib/active_support/dependencies.rb:223:in `load_dependency'
activesupport (3.1.3) lib/active_support/dependencies.rb:234:in `load'
execjs (1.3.1) lib/execjs/external_runtime.rb:90:in `json_decode'
execjs (1.3.1) lib/execjs/external_runtime.rb:62:in `extract_result'
execjs (1.3.1) lib/execjs/external_runtime.rb:28:in `block in exec'
execjs (1.3.1) lib/execjs/external_runtime.rb:41:in `compile_to_tempfile'
execjs (1.3.1) lib/execjs/external_runtime.rb:27:in `exec'
execjs (1.3.1) lib/execjs/external_runtime.rb:19:in `eval'
execjs (1.3.1) lib/execjs/external_runtime.rb:33:in `call'
coffee-script (2.2.0) lib/coffee_script.rb:57:in `compile'
tilt (1.3.3) lib/tilt/coffee.rb:46:in `evaluate'
tilt (1.3.3) lib/tilt/template.rb:76:in `render'


I am having the same problem. Downgrading to 1.3.0 solved it for me.



Hi Ryan :)








This error only occurs if you lock an older version (< 1.3.0) of multi_json. Updating multi_json also makes this error go away.


@jmazzi's suggestion worked for me.


me too, thanks!

@josh josh pushed a commit that closed this issue May 7, 2012
@weppos weppos Fix invalid MultiJson API detection (closes #82)
`#load` is defined in Kernel and inherited in every object, thus Object.respond_to?(:load) will always return true.

MultiJson switched to load/dump from decode/encode. Thus it's safe to use a single check for both encoding and decoding methods.
@josh josh closed this in 5b87c9b May 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment