rails: deploy:assets:backup_manifest fails

after bundle update, deploy:assets:backup_manifest fails with following error:

INFO [0c385440] Running /usr/bin/env cp /home/path/to/production/releases/2015****/public/assets/manifest* /home/path/to/production/releases/2015****/assets_manifest_backup as ****@****.jp
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as ****@****.jp: cp exit status: 1
cp stdout: Nothing written
cp stderr: cp: cannot stat ‘/home/path/to/production/releases/2015****/public/assets/manifest*’: No such file or directory

The filename of manifest seems to be renamed to .sprockets-manifest-(random).json

The change is maybe https://github.com/rails/sprockets/commit/ce6508e8540f829c6221afa39fdf718e4dded096 included since sprockets 3.0.0.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 1
  • Comments: 37 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Updating to capistrano-rails 1.1.8 fixed this issue for me.

meanwhile, here is a temporary fix - it just creates an /^manifest/ file to satisfy the code

  task :fix_absent_manifest_bug do
    on roles(:web) do
      within release_path do  execute :touch,
        release_path.join('public', fetch(:assets_prefix), 'manifest-fix.temp')
      end
   end
  end

  after :updating, 'deploy:fix_absent_manifest_bug'

I have the same issue…

cd /var/www/sa/releases/20170325010355 && /usr/bin/env cp /etc/profile.d/lang.sh: line 19: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory /var/www/sa/releases/20170325010355/public/assets/.sprockets-manifest-3f843658ebd0a7e65891643e86a5bb23.json /var/www/sa/releases/20170325010355/assets_manifest_backup' cp stderr: Nothing written

My gems versions:

sprockets (3.7.1) sprockets-rails (3.2.0) capistrano-rails (1.2.3, 1.1.8) Rails 5.0.2 ruby 2.4.1 capistrano (3.8.0)

I have the same issue with Rails 3.2.22.5, ruby 1.9.3-p551, capistrano-rails 1.1.8 and sprockets 2.2.2. I am stuck with Rails 3.2.22.5 so I can’t use sprockets higher than 2.2.2.

Here’s my fix.

namespace :deploy do
    task :fix_absent_manifest_bug do
    on roles(:web) do
      within release_path do  execute :touch,
        release_path.join('public', fetch(:assets_prefix), 'manifest.tmp')
      end
    end
  end
  before :updated, 'deploy:fix_absent_manifest_bug'
end

Just run into this issue with capistrano-rails 1.1.5 and ruby 2.3.0, rails 4.2.5, sprockets 3.5.2

The fix from @lessless https://github.com/capistrano/rails/issues/111#issuecomment-94151119 worked for me, the one from @taf2 https://github.com/capistrano/rails/issues/111#issuecomment-167590766 didn’t.