从Rails 3.1.0.rc6升级到Rails 3.1.0后,运行资源时收到一些错误消息:预编译任务如下:
$RAILS_ENV=production RAILS_GROUPS=assets rake assets:clean tmp:clear assets:precompile rake aborted! ie-spacer.gif isn't precompiled (in app/assets/stylesheets/jquery.gritter.css.scss) Tasks: TOP => assets:precompile (See full trace by running task with --trace)
我尝试添加config.assets.precompile<<< 'ie-spacer.gif'到config / application.rb,但它仍然失败. jquery.gritter.css.scss中的行是:
background: asset_url('ie-spacer.gif',image);
我试过:
background: asset_path('ie-spacer.gif',image); background: image_url('ie-spacer.gif'); background: image_path('ie-spacer.gif');
所有失败与ie-spacer.gif未预编译.