rails-composer icon indicating copy to clipboard operation
rails-composer copied to clipboard

Error caused by adding 'require bootstrap-sprockets' to application.js

Open jeremykohn opened this issue 9 years ago • 0 comments

After creating a custom starter app using

rails new . -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb

and selecting the option to include Bootstrap 2.3, I got an error when trying to load the application's root page:

Sprockets::FileNotFound at /
couldn't find file 'bootstrap-sprockets' with type 'application/javascript'

This was apparently caused by the following line in application.js:

//= require bootstrap-sprockets

When I removed that line, it fixed the problem.

But I'm not sure how it was added in the first place, since bootstrap-sprockets doesn't appear in the Rails Composer source code.


Also see this answer on StackOverflow:

Try removing bootstrap-sprockets from your application.js. It doesn't need to be there, and it's creating the error.

jeremykohn avatar Dec 17 '15 00:12 jeremykohn