LoginSignup
5
5

More than 5 years have passed since last update.

Asset filtered out〜っていうエラーが出た場合の対処。

Posted at

Asset filtered out and will not be served: add Rails.application.config.assets.precompile += %w( books.css ) to config/initializers/assets.rb and restart your server

ていうエラーが昨日から出ていまして困っていましたが、Rails4.1特有の事象みたいです。

解決方法は

config/environments/development.rb

config.assets.raise_runtime_errors = <span style="color: #0000ff;">ture</span>

config/environments/development.rb
config.assets.raise_runtime_errors = <span style="color: #ff0000;">false</span>

に書き換えます。
その後Webサーバだけ再起動して、アクセスすれば動きます。

Ruby on Rails 4アプリケーションプログラミング

の159pですので皆さんお気をつけ下さい。あと結構この本誤植があるので、都度読み替えないとダメっぽいです。

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