Can't run bootsrap : couldn't find file 'bootstrap-sprockets' with type 'application/javascript'
12,044
Solution 1
Try removing bootstrap-sprockets from your application.js. It doesn't need to be there, and it's creating the error.
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require turbolinks
//= require_tree .
Solution 2
I had the same issue:
couldn't find file 'bootstrap-sprockets' with type 'application/javascript'
The only solution was to comment off:
# gem 'sass-rails', '~> 5.0'
And add instead:
gem 'sass-rails', '>= 3.2'
In the Gemfile
, I hope this helps other members.
Author by
icecreamrabbit
Updated on August 08, 2022Comments
-
icecreamrabbit over 1 year
Having some problems installing bootstrap onto my rails project.
howing /Users/muhname/Photogur/app/views/layouts/application.html.erb where line #10 raised:
couldn't find file 'bootstrap-sprockets' with type 'application/javascript'
my application.js file:
//= require jquery //= require jquery_ujs //= require bootstrap //= require bootstrap-sprockets //= require turbolinks //= require_tree .
my css:
/ *= require bootstrap_and_overrides / *= require_tree . / *= require_self / /* @import "bootstrap"
gem: 'bootstrap-sass', '3.0.2.1'
Anybody who might know what the issue is? thanks!
-
Venkat Ch almost 9 yearsHow did you included
bootstrap-sass', '3.0.2.1'
in the Gemfile? I guess, if this was included ingroup :assets
, please move out from this and it should work. This is because, I think you are using Rails4 and it drops support for assets group in gemfile. See here -
Elvn almost 9 yearsWill you please post the code block around the error you mentioned? Users/muhname/Photogur/app/views/layouts/application.html.erb: line #10
-
Tᴀʀᴇǫ Mᴀʜᴍᴏᴏᴅ over 7 yearsThis would be the correct solution: stackoverflow.com/a/28322353/5645769
-