Rails 4: assets not loading in production

前端 未结 18 1380
梦如初夏
梦如初夏 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:16

    I was able to solve this problem by changing: config.assets.compile = false to
    config.assets.compile = true in /config/environments/production.rb

    Update (June 24, 2018): This method creates a security vulnerability if the version of Sprockets you're using is less than 2.12.5, 3.7.2, or 4.0.0.beta8

提交回复
热议问题