I got a problem when adding bootstrap into my rail project. The error message is given as:
File to import not found or unreadable: bootstrap-sprockets.
I have tried the following two solutions but none of them works for me.
Solution 1: Couldn't find file 'twitter/bootstrap' (ROR)
Solution 2: Sprockets::FileNotFound couldn't find file 'bootstrap' with type 'text/css'
3
Answers
First you need add gem gem ‘bootstrap-sass’, ‘3.3.6’ to your Gemfile then
bundle install then you must
to your scss file. Hope it will help you.
In here
It says,
Rename your application.css to application.scss.
Delete *= require self and require tree
Add @import bootstrap-sprockets and bootstrap at the last line of the file.
Hope this helps.
I had the same issue.
If Bootstrap was installed with yarn, I found that reinstalling it solved the issue: