我希望在我的rails项目中手动使用twitter引导程序。
但是我得到了这个错误,并且引导程序的一些功能不起作用。
如果你帮我,我很感激。谢谢。
控制台上的错误
Uncaught :无法读取未定义的引导-popover.js:38的属性‘构造器’ (匿名函数)引导-popover.js:38 (匿名函数)引导-popover.js:115
app/view/app/index.html.erb
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<%= stylesheet_link_tag "bootstrap" %>
<%= stylesheet_link_tag "bootstrap-responsive" %>
<%= javascript_include_tag "jquery" %>
<%= javascript_include_tag "bootstrap" %>
<%= javascript_include_tag "bootstrap-transition" %>
<%= javascript_include_tag "bootstrap-alert" %>
<%= javascript_include_tag "bootstrap-modal" %>
<%= javascript_include_tag "bootstrap-dropdown" %>
<%= javascript_include_tag "bootstrap-scrollspy" %>
<%= javascript_include_tag "bootstrap-tab" %>
<%= javascript_include_tag "bootstrap-tooltip" %>
<%= javascript_include_tag "bootstrap-popover" %>
<%= javascript_include_tag "bootstrap-button" %>
<%= javascript_include_tag "bootstrap-collapse" %>
<%= javascript_include_tag "bootstrap-carousel" %>
<%= javascript_include_tag "bootstrap-typeahead" %>
<!-- as example, which doesn't work, somehow -->
<i class="icon-search icon-home"></i>我相信所有必需的js和css文件都在
发布于 2013-01-02 12:07:25
如果希望在Rails >3中添加资产文件(如.js、.css或图像),则应该使用清单文件: application.js、application.css。在将源代码复制到它们的目录中之后,您应该做出如下声明:
application.js :
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require bootstrap-responcive
//= require tree .在application.css中:
*= require_self
*= require bootstrap
*= require_tree .在您的视图中包含`<%= javascript_include_tag %>是无用的。
https://stackoverflow.com/questions/14121509
复制相似问题