Hello,
I am facing this weird issue. I believe the asset digests are generated
based on the content of the file. However, when I deploy my application
using Capistrano to staging environments and multiple boxes in
production
environment, I see different digests everywhere.
E.g.
In staging
walk-7c37170aabab6fdd99a9d17a303abfaf.jpg
Production
walk-0456e469fd62f3542f72164914da851f.jpg
walk-14c6d0204ad05c65f224f93e3d60deb8.jpg(older)
walk-73cce916ff11427c80512c1e69be4d4d.jpg(older)
I am not using any custom Capistrano tasks. Here is my deploy.rb for
reference.
set :application, ‘’
set :deploy_user, ‘ubuntu’
set :deploy_to,
“/home/#{fetch(:deploy_user)}/apps/#{fetch(:application)}”
set :migrate_target, :current
set :rails_env, “production”
set :rvm1_ruby_version, “2.1.1”
set :rvm_type, :system
set :default_shell, ‘/bin/bash -l’
set :pty, true
set :ssh_options, {
forward_agent: true}
#RVM setup
set :scm, :git
set :repo_url, ‘’
set :branch, “master”
set :log_level, :debug
set :linked_files, fetch(:linked_files,
[]).push(‘config/database.yml’,‘config/application.yml’,‘config/secrets.yml’)
set :linked_dirs,
fetch(:linked_dirs,[]).push(‘log’,‘tmp/pids’,‘tmp/cache’, ‘tmp/sockets’,
‘vendor/bundle’,‘public/system’,‘public/images’,‘public/assets’)
set :bundle_binstubs, nil
after ‘deploy:publishing’, ‘deploy:restart’
namespace :deploy do
task :restart do
invoke 'unicorn:restart’end
end
What could explain this difference? Am I doing something wrong? Can I
force
asset digests to be created consistently?
Also posted on stackoverflow.