我将新的rails 4应用程序部署到linode。 我的js / css已正确加载,但图片未加载。
以下是我在production.rb中的设置。
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = true
# Generate digests for assets URLs.
config.assets.digest = true
# Version of your assets, change this if you want to expire all your assets.
config.assets.version = '1.0'
config.serve_static_assets = true
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
所以我查看了我的共享/资产/图片
它的图像类似于twitter-7ea9292a334406402a4f2e823622fe49.png
但是当我检查我的html时,它会显示
<img src="assets/twitter.png">