當使用bootstrap-sass gem我已經正確加載了我的css文件,但是當我嘗試加載javascript文件時一直收到錯誤。我遵循從https://github.com/twbs/bootstrap-sass加載JavaScript的過程,但是當我在本地主機上查看我的網頁Bootstrap-sass gem Javascript not working in Rails 4
我收到錯誤「could not find file'bootstrap'」
這是我的application.js文件看起來像 - 任何幫助將非常感激!的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
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require turbolinks
// Loads all Bootstrap javascripts
//= require bootstrap
//= require_tree .
你如何確保您正在加載的應用程序。 js從資產管道? – eNN
讓我們在Rails 4中說,如果你使用'application.html.erb'作爲佈局,如果它包含像'<%= javascript_include_tag「應用程序」,「data-turbolinks-track」=> true'那麼你可以確定它包括在內。在這種情況下,它包括在內的 – Peeyush
。你知道還有什麼可能嗎? – eNN