【问题标题】:Openshift - CSS is not being refreshed despite asset precompilingOpenshift - 尽管资产预编译,但 CSS 没有被刷新
【发布时间】:2013-04-12 20:45:33
【问题描述】:

我有一个奇怪的问题,导致我的头发被拉了 6 个小时。

尽管 git push log 说正在编译资产并通过 SSH 运行手动执行相同操作

RAILS_ENV="production" bundle exec "rake assets:precompile"

我的 CSS 在我的生产应用程序上仍然看起来不正确

在我的生产服务器上:

margin: 0 2px 5px 0;

但我想要和我的开发机器上已有的一样

margin: 1px 4px 1px 0;

如何确保我的 CSS 与开发机器同步?

【问题讨论】:

  • 我注意到删除正在运行的 rm ./repo/public/assets/*css* 然后运行 ​​RAILS_ENV="production" bundle exec "rake assets:precompile" 可以解决问题,但是有没有办法在执行 git push 时这样做?
  • 如果您使用 Capistrano 进行部署,则默认情况下会执行预编译资产的任务,以防您在 Capfile 中取消注释 load 'deploy/assets'。

标签: css ruby-on-rails-3 asset-pipeline openshift


【解决方案1】:

您可以通过操作挂钩 https://www.openshift.com/developers/deploying-and-building-applications 更改 Openshift 部署行为

【讨论】:

    猜你喜欢
    • 2013-01-20
    • 1970-01-01
    • 2013-05-28
    • 2013-05-08
    • 1970-01-01
    • 2012-02-06
    • 1970-01-01
    • 1970-01-01
    • 2012-03-19
    相关资源
    最近更新 更多