码迷,mamicode.com
首页 > 其他好文 > 详细

Images and assets not working in production server

时间:2014-08-21 09:46:13      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:os   io   for   ar   art   div   cti   line   

Here are a few problems that you might be having:

1 - Your production configuration may not be correct. This is particularly likely if you started out with an early 3.1 release candidate, and have been updating along the way. The suggested options for production.rb changed quite a bit between rc4 and the 3.1.0 release.

Make sure that your production.rb settings include:

# Disable Rails‘s static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
# Don‘t fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false
# Generate digests for assets URLs
config.assets.digest = true

2 - You may have forgotten to precompile your assets

RAILS_ENV=production rake assets:precompile

3 - You may have forgotten to restart your web server to pick up the changes in production.rb.

Images and assets not working in production server,布布扣,bubuko.com

Images and assets not working in production server

标签:os   io   for   ar   art   div   cti   line   

原文地址:http://www.cnblogs.com/qinyan20/p/3926384.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!