首页 > 其他 > 详细

Images and assets not working in production server

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

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!