LoginSignup
15
15

More than 5 years have passed since last update.

SASS::SyntaxError in のエラーの解決方法

Last updated at Posted at 2015-09-03

エラーの原因

どうやら原因にgemのbootstrap-sassが入っていなかったこと、hamlファイルであったことがエラーの原因になっていたと考えられる。

Qiita

applicaton.css.scssを編集

変更前(エラー時の記述)

apllication.css.scss
@import "bootstrap";
@import "protospace";

変更後(エラーを直した後の記述)

apllication.css.scss
@import "bootstrap-sprockets";
@import "bootstrap";
@import "protospace";

このようにsprocketsを挿入したことでassets ファイルのコンパイルを行ってくれて、うまくファイルを読み込んでくれるそうです。

Gemfileを編集

変更前

Gemfile
gem 'twitter-bootstrap-rails'

変更後

Gemfile
gem 'bootstrap-sass'

として再起動するとエラーは解除されました。

参考url

sprockets の README 意訳
http://blog.willnet.in/entry/20110928/1317196255

15
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
15