【问题标题】:CSS not updating after Heroku deploymentsHeroku 部署后 CSS 未更​​新
【发布时间】:2013-11-13 06:13:56
【问题描述】:

我已经阅读了其他类似问题的问题并尝试了他们的修复无济于事

我有一个 3.2.14 Rails 应用程序,当我在一个 CSS 文件中进行更改然后将代码推送到 heroku 时,特定的 CSS 更改不会更新。我已经试过了:

-Verified that my git status is clean.
-- Tested in New Google Incognito Window for cache check
-- heroku restart
-- rake assets:precompile before deploying
-- Followed these instructions to specifically precompile in production environment
https://devcenter.heroku.com/articles/rails-asset-pipeline
-- Ran: 
bundle exec rake tmp:clear
bundle exec rake assets:clean RAILS_ENV=production
bundle exec rake assets:precompile RAILS_ENV=production 

感谢阅读。任何指导将不胜感激。

【问题讨论】:

  • 你能发布你的 config/environments/production.rb & Gemfile
  • 您确定您的应用提供静态资源了吗? (根据 production.rb)?
  • 另外,如果您右键单击>查看源代码,您是否在标题中看到有效文件?

标签: css ruby-on-rails git heroku


【解决方案1】:

您现在可能已经解决了您的问题。但是我相信按以下顺序尝试这些命令会起作用。

$bundle exec rake assets:precompile
$git add . 
$git commit -m "msg" 
$git push heroku master

【讨论】:

  • 谢谢!现在完全帮助了我,14 年 12 月 :)
猜你喜欢
  • 2014-10-16
  • 1970-01-01
  • 2018-10-10
  • 1970-01-01
  • 1970-01-01
  • 2011-02-16
  • 2013-12-31
  • 2022-11-29
  • 1970-01-01
相关资源
最近更新 更多