7

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!

icecreamrabbit
  • 207
  • 1
  • 3
  • 12
  • 1
    How did you included `bootstrap-sass', '3.0.2.1'` in the Gemfile? I guess, if this was included in `group :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](http://stackoverflow.com/q/16406204/5076451) – Venkat Ch Jul 12 '15 at 18:42
  • Will you please post the code block around the error you mentioned? Users/muhname/Photogur/app/views/layouts/application.html.erb: line #10 – Elvn Jul 12 '15 at 19:03
  • This would be the correct solution: http://stackoverflow.com/a/28322353/5645769 – Tᴀʀᴇǫ Mᴀʜᴍᴏᴏᴅ Jan 03 '17 at 10:05

3 Answers3

9

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 .
Elvn
  • 3,021
  • 1
  • 14
  • 27
1

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.

Sebastián Palma
  • 32,692
  • 6
  • 40
  • 59
tzurcan
  • 11
  • 1
0

I had a similar error:

couldn't find file 'bootstrap-material-design.js' with type 'application/javascript'

and I can fix removing this line in application.js

//=require bootstrap-material-design.js

Try it!

Sandra
  • 358
  • 3
  • 5