Dimon Dimon - 6 months ago 12
Ruby Question

couldn't find file 'bootstrap' but it exists

I cloned a Rails 4.1.7 project from git and now have an exception:

couldn't find file 'bootstrap'
(in my_app/app/assets/stylesheets/application.css:13)


My appli-on.css:

*= require bootstrap
*= require font-awesome
*= require s3_direct_upload_progress_bars
*= require_tree .
*= require_self
*/


Gemfile:

gem 'bootstrap-sass'

Answer

Per the README...

You need to ensure you have both bootstrap-sass and sass-rails gems installed and in your Gemfile:

gem 'bootstrap-sass', '~> 3.3.6'
gem 'sass-rails', '>= 3.2'

You will also need to change your application.css to application.scss. It would look something like this:

@import "bootstrap-sprockets";
@import "bootstrap";

//= require font-awesome
//= require s3_direct_upload_progress_bars
//= require_tree .
//= require_self
Comments