Rails asset pipeline - image_path helper only working in development

后端 未结 2 1566
名媛妹妹
名媛妹妹 2021-01-14 04:17

I have a problem with asset preocompilation in Rails (3.2.7).

I am including an favicon like this:



        
2条回答
  •  广开言路
    2021-01-14 04:56

    Ok, after a couple of tries I figured out, how to fix this. Nevertheless it´s a little bit strange and does not satisfy me completely. It only worked for me, when I set digest to true and provide the path to the manifest:

    config.assets.compile = false
    config.assets.digest = true
    config.assets.manifest = Rails.root.join("public/assets")
    

    It would be interesting to know, what´s behind this "logic".

提交回复
热议问题