2012-03-28 54 views
4

我一直与Ryan的Railscast 328329沿着以下。引导切换到萨斯JavaScript错误

事情伟大的工作,直到我切换到引导 - 萨斯在329.现在我得到这个错误:

Uncaught TypeError: Object [object Object] has no method 'popover' 

是从bootstrap.js到来。 bootstrap.js是越来越jquery.js加载后(这是1.7.1版本

application.js文件:?

// This is a manifest file that'll be compiled into application.js, which will include all the files 
// listed below. 
// 
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. 
// 
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 
// the compiled file. 
// 
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD 
// GO AFTER THE REQUIRES BELOW. 
// 
//= require jquery 
//= require jquery_ujs 
//= require bootstrap 
//= require_tree . 

有一些其他的文件,我需要需要

感谢

回答

9

你可以在你的javascript文件夹中没有一个名为bootstrap的文件。链轮找到该文件而不是gem中的文件。

+0

我将其重命名为bootstrap-custom.js仍然出现错误 Uncaught TypeError:Object [object Object] has no method'on' – 2012-05-31 08:25:01

+0

具体来说,bootstrap.js.coffee可能应该被称为bootstrapify.js.coffee或其他东西类似。 – wesgarrison 2013-01-22 05:25:28