Rails not serving assets in production or staging environments

后端 未结 2 886
迷失自我
迷失自我 2021-01-19 04:54

In the process of debugging this problem, I have tried to run my application in production mode locally and it doesn\'t serve up any assets. Additionally, I have a s

相关标签:
2条回答
  • 2021-01-19 05:27

    This is sort of a guess, but doesn't compile assets need to be set to true?

    config.assets.compile = true
    

    and i think you need to compile the assets like this:

    rake assets:precompile RAILS_ENV='production'
    
    0 讨论(0)
  • 2021-01-19 05:42

    So the problem was that the memory store was set to config.cache_store = :dalli_store which was causing errors and setting it to config.cache_store = :memory_store resolved it.

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