Bootstrap-sass gem Javascript无法在Rails中工作4

当使用bootstrap-sass gem我已正确加载我的css文件时,但是当我尝试加载javascript文件时收到错误。 我已经按照从https://github.com/twbs/bootstrap-sass加载javascript的过程但是当我在localhost上查看我的网页时

我收到错误“找不到文件’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 . 

Rails 4 :assets组不再使用 ,请从Gemfile中删除该组:

Rails 4.0从Gemfile中删除了资产组。 升级时,您需要从Gemfile中删除该行。 您还应该更新您的应用程序文件(在config / application.rb中):

Bundler.require(:default,Rails.env)

我通过从gemfile中的资产组中删除gem’bootstrap-sass’,’〜> 3.0.3.0’来实现它! 好极了

您是否bundle install并确保加载application.js (来自资产管道)。