LoginSignup
6
1

More than 5 years have passed since last update.

RailsアプリをHerokuにデプロイした時にSass::SyntaxErrorが出たら確認すること

Last updated at Posted at 2016-12-11

環境

  • Mac OS X El Capitan 10.11.6
  • Rails 5.0.0.1
  • Ruby 2.3.1

問題

  • Herokuへのデプロイ時にSass::SyntaxErrorが起きていると表示された
Sass::SyntaxError: Invalid CSS after "}": expected selector or at-rule, was "}"

原因

  • } が1つ余分にあるのが原因でした
hoge.css
.photo {
  width: 100%;
}
.review {
  font-size: 16px;
}
}

背景

  • scssファイルではなく、cssファイルを使用
  • scssファイルなら開発環境でSyntaxErrorが起きるが、cssファイルに書いている場合は } が1つ多くてもエラーが起きないため気づかなかった
6
1
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
6
1