Rails 4: assets not loading in production

前端 未结 18 1432
梦如初夏
梦如初夏 2020-11-29 15:15

I\'m trying to put my app into production and image and css asset paths aren\'t working.

Here\'s what I\'m currently doing:

  • Image assets live in /app/a
18条回答
  •  醉酒成梦
    2020-11-29 16:18

    Rails 4 no longer generates the non fingerprinted version of the asset: stylesheets/style.css will not be generated for you.

    If you use stylesheet_link_tag then the correct link to your stylesheet will be generated

    In addition styles.css should be in config.assets.precompile which is the list of things that are precompiled

提交回复
热议问题