Heroku: Error encountered while saving cache

后端 未结 3 2081
孤独总比滥情好
孤独总比滥情好 2020-12-03 11:42

Everything works fine locally, but when pushing to Heroku:

   Warning. Error encountered while saving cache /tmp/build_1b5c442a-d24e-4f80-9755-a0bd15d7f029/t         


        
相关标签:
3条回答
  • 2020-12-03 12:25

    First you might want to update

    bundle update sass-rails
    bundle update sass
    

    Then the more critical part (make sure you uninstall the sass version in your Gemfile.lock)

    gem uninstall sass
    bundle install
    
    0 讨论(0)
  • 2020-12-03 12:27

    This is related to the recent upgrade of the sass gem to 3.3.0. The sass gem is a dependency of a couple of other sass gems, so even if you don't have it in your Gemfile, it is probably getting loaded. Do a "bundle show" locally and on Heroku and I'm fairly sure you'll see they are different versions (sass was upgraded to 3.3.0 just a couple days ago).

    Add:

    gem 'sass', '3.2.13'
    

    to your Gemfile and that should fix things for you. Then go submit an issue on github for this gem.

    Hope this helps, it worked for me!

    0 讨论(0)
  • 2020-12-03 12:39

    This is a known bug in Sass 3.3.0, the Sprockets importer is unserialized and so un-cacheable causing this error. For the bug report see this. Without the caching, Sass compiles excruciatingly slow which leads to the timeout on heroku servers.

    0 讨论(0)
提交回复
热议问题