2011-12-08 50 views
1

嘗試加載具有主幹的rails 3應用程序時出現此錯誤。uncaught typeError:無法調用未定義的方法'extend'

在我的導軌控制檯上,我不斷收到以下內容。

304 not modified.

could not determine content-length of response body.

set content-length of the response or set response#chunked = true

+0

你包括underscore.js? – czarchaic

+0

是啊// =要求jquery // =要求jquery_ujs // = require_tree。 // =需要主幹 // =需要jquery-1.5.1.min // =需要下劃線 // =需要mynotes – user979587

+0

我需要將underscore.js文件合併到主幹中作爲一個文件嗎? – user979587

回答

1

要解決此問題,請確保您的JavaScript文件按正確順序調用。 jQuery應該是第一個,然後是下劃線,最後是Backbone。

例如,如果你沒有使用require.js:

<script src="jquery.min.js"></script> 
<script src="underscore.js"></script> 
<script src="backbone.js"></script> 
相關問題