Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/54.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Heroku部署后CSS不更新_Css_Ruby On Rails_Git_Heroku - Fatal编程技术网

Heroku部署后CSS不更新

Heroku部署后CSS不更新,css,ruby-on-rails,git,heroku,Css,Ruby On Rails,Git,Heroku,我读过其他类似的问题,并尝试了它们的修复,但没有效果 我有一个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 dep

我读过其他类似的问题,并尝试了它们的修复,但没有效果

我有一个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 

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

也许你现在已经解决了你的问题。不过,我相信按以下顺序尝试这些命令会奏效

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

你能发布你的config/environments/production.rb&gemfile吗?你是否确保你的应用程序服务于静态资产?(根据production.rb)?另外,如果右键单击>查看源代码,是否在标题中看到有效文件?谢谢!现在完全帮助了我,12月14日:)