每次进行更改以查看浏览器的差异时,我都需要预编译资产 [英] I need precompile assets every time I've made any change to see difference in browser

查看:114
本文介绍了每次进行更改以查看浏览器的差异时,我都需要预编译资产的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

就像我在标题中提到的那样-每次进行任何更改以查看其外观时,我都必须预编译资产-我尝试了config.assets.compile = true,但没有成功.

Like as I mentioned in title - I have to precompile assets every time I've made any change to see how it looks like - I've tried config.assets.compile = true, without success.

我也尝试过RAILS_ENV = 'development',但效果相同.请帮助我,因为它确实很烦人.

I've also tried RAILS_ENV = 'development' but with same effect. Please help me because it is really annoying.

我的系统正在运行:

  • Xubuntu
  • 轨-v:3.1.1
  • Ruby -v:1.9.2p290

我也尝试过:

config.action_controller.perform_caching = true

推荐答案

一个可能的原因是您运行rake assets:precompile一次.然后,服务器仅使用public/assets,而无需尝试动态编译资产.

One cause of this could be that you ran rake assets:precompile once. The server then uses public/assets exclusively, without trying to compile your assets on the fly.

尝试删除public/assets目录.

这篇关于每次进行更改以查看浏览器的差异时,我都需要预编译资产的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆