LoginSignup
4
5

More than 5 years have passed since last update.

RailsのAssetでError compiling CSS asset, EOFError: end of file reachedと出た時の対処法

Last updated at Posted at 2015-01-05

僕の場合テスト回してる時に特定ページのみで発生しました。
ぐぐったらstack overflowでこんな記事を見つけたのでその共有。

原因

どうやらassetsのキャッシュが悪さをしているようです
Railsのキャッシュファイルは#{Rails.root}/tmp/cache/assets配下に環境ごとにディレクトリが分けられてます

$ tree -L 2 -d tmp/cache/assets/
tmp/cache/assets/
├── development
│   ├── sass
│   └── sprockets
├── production
│   ├── sass
│   └── sprockets
└── test
    ├── sass
    └── sprockets

エラーが出た環境のsass/及びsporckets/ディレクトリ配下のファイルをすべて削除することでエラーが解消されました。

4
5
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
4
5