Reputation: 43
I have following problem. "File to import not found or unreadable: bootstrap-sprockets."
Following gems I have installed gem 'bootstrap' gem 'bootstrap-sass', '~> 3.3.7' gem 'sass-rails', '>= 3.2'
File: Application name change from css to scss. In the application.scss file I add the lines
@import "bootstrap-sprockets"; @import "bootstrap";
I bundle install and afterwards restart the server. But still the same error message. It will be great if somebody had the same issue and found a solution, all written solutions on stackoverflow doesn't work.
Upvotes: 1
Views: 3805
Reputation: 43
OK, I worked on topic and the working solution:
'bootstrap', '~> 4.1.3'
to Gemfile and savegem install sprockets-rails
in command line of project. Version at least 2.3.2, now 3.2.1 is availablebundle install
in command line of projectapplication.css
to application.scss
under /app/assets/stylesheets
@import "bootstrap";
at file application.scssrails s
in command line of projectYou can check my code free https://bitbucket.org/ArtLion74/myrecepies commit with name Bootstrap working in chrome and firefox.
Regards, Artur
_______________________ old answer ____________________
it's not RoR problem. You didn't say that you see error in ... Chrome :) I had the same. Check in Firefox and ... surprise - working. Problem is only on Chrome. Strange is that after switching to Chrome - it's start working - without errors but without bootstrap formatting too :( I really don't get it :(
Problem is on www client side Chrome - not in RoR.
Upvotes: 0