【发布时间】:2015-05-12 10:31:07
【问题描述】:
我在 site5 上部署了我的应用程序,我的 .css 和 .js 正在完美预编译 ,我在另一边的图像正在预编译(文件),但未显示在最终视图中。
这是我的生产环境:
CmsDevise::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
config.relative_url_root = "/~firmaltt"
config.assets.precompile = ['*.js', '*.css', '*.css.erb', '*.*']
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
# Compress JavaScripts and CSS
config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true
# Generate digests for assets URLs
config.assets.digest = true
文件图像路由列在 /assets(文件)和我的 manifest.yml 中,但仍未显示。 rake assets:precompile env=production 运行没有问题。
我每次都使用 touch tmp/restart.txt 重新启动服务器。 删除所有资产并再次预编译。还是什么都没有:(
更新,评论:
#config.relative_url_root = "/~firmaltt"
【问题讨论】:
-
添加了 config.assets.precompile += %w[ *.png *.jpeg *.jpg *.gif ] 仍然没有
标签: ruby-on-rails ruby rake production