An error occurred during rails5 Intermediate Tutorial The following error image
When I translate the explanation of the error sentence
"Error: The file to import cannot be found or read: bootstrap-sprockets. 15: 1 line of app / assets / stylesheets / application.scss @import "bootstrap-sprockets";」
Will be. It is hypothesized that sprockets are supposed to not exist, although the import description is read.
Many of the sites that appear when searching with an error statement are said to be caused by not doing rails s, but in my case restarting with rails s has no effect. [Reference site](https://www.it-swarm.dev/ja/ruby-on-rails/sass-syntaxerror%EF%BC%9A%E3%82%A4%E3%83%B3%E3%83 % 9D% E3% 83% BC% E3% 83% 88% E3% 81% 99% E3% 82% 8B% E3% 83% 95% E3% 82% A1% E3% 82% A4% E3% 83% AB % E3% 81% 8C% E8% A6% 8B% E3% 81% A4% E3% 81% 8B% E3% 82% 89% E3% 81% AA% E3% 81% 84% E3% 81% 8B% E5 % 88% A4% E8% AA% AD% E3% 81% A7% E3% 81% 8D% E3% 81% AA% E3% 81% 84% EF% BC% 9Abootstrapsprockets / 1049262166 /)
I was able to solve it by playing with application.scss
application.before scss fix
@import "bootstrap-sprockets";
@import "bootstrap";
@import "protospace";
Delete the third line
application.After scss correction
@import "bootstrap-sprockets";
@import "bootstrap";
Apparently, when I was looking at some sites to solve it, it was caused by accidentally importing protospace. So the solution was to describe the lack of rails s and the wrong import.
Recommended Posts