ruby - Rails 4 asset precompile image error -
i have application being upgraded rails 3 rails 4 , working fine in development on windows 7 box. however, when try test production on centos 5.10 virtual machine images broken. firefox displays, "the image cannot displayed because contains errors" , chrome appears blank. when use curl following information:
http/1.1 200 ok
date: tue, 03 jun 2014 20:36:44 gmt
server: apache/2.2.3 (centos)
cache-control: public, must-revalidate
etag: "6fda96e78f0677973258d551e4c1a95e"
x-request-id: 6ae8054b-8756-4ab1-906f-10ce13da31ed
x-runtime: 0.004431
x-sendfile: /home/foo/app/assets/images/loading.gif
x-powered-by: phusion passenger 4.0.41
content-length: 0
last-modified: mon, 02 jun 2014 20:38:10 gmt
status: 200 ok
connection: close
content-type: image/gif
as can see using phusion passenger 4.0.41 on apache 2.2.3. centos version 5.10. double checked mod_xsendfile indeed installed, , was.
i've tried suggested on github no success.
my logs started "asset-files/loading.gif 10.0.0.187 @ 2014-06-03 -0600
(note assets changed asset-files due conflicting model named asset rails 2 days).
i did precompile assets also. delete cache. ideas?
i found stackoverflow post on it, can found on images , assets not working in production server on rails 3.1.0.
basically, had add following 2 lines config/enviornments/production.rb file:
config.assets.compile = false config.assets.digest = true
then compiled assets again , restarted application , appears working.
Comments
Post a Comment