[RUBY] SassC :: SyntaxError in Pages # index Remedy for rails5 Intermediate Tutorial

An error occurred during rails5 Intermediate Tutorial The following error image 415e5c6c8622f2ea3ffb780959431d92.png

Hypothesis and what I tried

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 /)

Solution

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

SassC :: SyntaxError in Pages # index Remedy for rails5 Intermediate Tutorial
Remedy for command not found in rails s
What to do if you get the warning "Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1." in Rails 6.0
Remedy for command not found in rails s
SassC :: SyntaxError in Pages # index Remedy for rails5 Intermediate Tutorial
rails tutorial chapter 10 summary (for self-learning)
How to use MySQL in Rails tutorial
Testing for Error Messages: Rails Tutorial Notes-Chapter 7