LoginSignup
3
2

More than 5 years have passed since last update.

image_tag が UndefinedConversionError を吐く

Posted at

Rails 5 beta 3 && Sprockets 3.5.2
image_tag の部分が Encoding::UndefinedConversionError を出すようになって困った。
再現条件は不明。

エラーメッセージ

Encoding::UndefinedConversionError in Public#index
Showing /path/to.html.slim where line #6 raised:

"\xE3" from ASCII-8BIT to UTF-8
Extracted source (around line #6):  

      .navbar-item
        a href="/"
          .logo = image_tag 'logo.png'

対策

rm -rf tmp/cache/assets/

どうやらキャッシュのエンコーディングが腐っていたらしい。このエラーメッセージから読み取るのは困難すぎる。

3
2
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
3
2