Rails 4: assets not loading in production

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

    change your Production.rb file line

    config.assets.compile = false
    

    into

    config.assets.compile = true
    

    and also add

    config.assets.precompile =  ['*.js', '*.css', '*.css.erb']
    

提交回复
热议问题