Reputation: 293
During my rails(3.2.16v) deploy with capistrano v3 I am getting the following error.
$cap development deploy --trace
DEBUG [014a40e4] Running /usr/bin/env [ -L /home/ec2-user/capistrano-3/my_app/releases/20140117124107/public/assets ] on 50.13.220.55
DEBUG [014a40e4] Command: [ -L /home/ec2-user/capistrano-3/my_app/releases/20140117124107/public/assets ]
DEBUG [014a40e4] Finished in 0.602 seconds with exit status 1 (failed).
DEBUG [9c5901ab] Running /usr/bin/env [ -d /home/ec2-user/capistrano-3/my_app/releases/20140117124107/public/assets ] on 50.13.220.55
DEBUG [9c5901ab] Command: [ -d /home/ec2-user/capistrano-3/my_app/releases/20140117124107/public/assets ]
DEBUG [9c5901ab] Finished in 0.639 seconds with exit status 1 (failed).
//// this error is at the end of the trace
** Invoke deploy:assets:backup_manifest (first_time)
** Execute deploy:assets:backup_manifest
DEBUG [a08f4c02] cp:
DEBUG [a08f4c02] cannot stat `/home/ec2-user/capistrano-3/my_app/releases/20140117064709/public/assets/manifest*'
DEBUG [a08f4c02] : No such file or directory
DEBUG [a08f4c02]
cap aborted!
cp stdout: Nothing written
cp stderr: Nothing written
Tasks: TOP => deploy:assets:backup_manifest
The deploy has failed with an error: #<SSHKit::Command::Failed: cp stdout: Nothing written
cp stderr: Nothing written
>
** Invoke deploy:failed (first_time)
** Execute deploy:failed
I don't have any assets folder in my local machine too. Can any body help me??
Upvotes: 15
Views: 7650
Reputation: 455
This happens with sprockets 3.0.x and capistrano-rails, and seems fixed with capistrano-rails 1.1.3.
If your Gemfile has gem 'capistrano-rails', '~> 1.1'
(as recommended in the installation guide), just type bundle update capistrano-rails
to upgrade.
See https://github.com/capistrano/rails/blob/master/CHANGELOG.md#113-apr-18-2015 or https://github.com/capistrano/rails/issues/111
Upvotes: 20
Reputation: 2689
Try:
touch /home/ec2-user/capistrano-3/my_app/releases/20140117064709/public/assets/manifest
I think a previous cap <env> deploy
that was misconfigured has gummed up the works, and now your forever doomed. Simply touch
ing a manifest file, will allow the task deploy:assets:backup_manifest
to keep on doing its thing, since it expects the previous builds manifest file to be there to clean up. So, give it something to clean. Anyways, this solved my problem.
tl;dr;
Make trash, keep littering, someone, somewhere will clean up after you, in this case one previous precompile's trash is assets_manifest_backup
's treasure.
I had also ssh'ed to server, ensured that RAILS_ENV=production bundle
worked just fine, and had to resolve some ssh deploy keys for a private git repo. That could have been the gum, gumming up my works.
Upvotes: 14
Reputation: 110
Are you precompiling your assets ? maybe it will help to precompile your assets before deployng.
Upvotes: 0