简体   繁体   中英

Capistrano fails when trying to deploy Rails asset manifest

I'm trying to deploy a Rails app that has worked successfully before, but Capistrano is barfing during deployment. I don't believe I've changed anything other than changing the Rails app code itself and updating some gems (ie the deploy.rb file is identical to a once-working setup.)

Here's the line it appears to fail on:

executing "cp -- /u/apps/myapp/shared/assets/manifest.yml /u/apps/myapp/releases/unable/assets_manifest.yml"

Notice how the directory it's trying to copy to is called unable . It's like it can't get the new release name/date or something? And yet earlier it executes this without error:

executing "cd -- /u/apps/myapp/releases/20130507041223 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile"

The remainder of the interesting output is this:

** cp: cannot create regular file `/u/apps/myapp/releases/unable/assets_manifest.yml'
** No such file or directory
failed: "rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell 'default' -c 'cp -- /u/apps/myapp/shared/assets/manifest.yml /u/apps/myapp/releases/unable/assets_manifest.yml'"

UPDATE: This appears to be a bug in Capistrano 2.15.4. Downgrading to version 2.14.2 fixed the problem. I've detailed the bug here:

https://github.com/capistrano/capistrano/issues/468

This appears to be a bug in Capistrano 2.15.4. Downgrading to version 2.14.2 fixes the problem. See https://github.com/capistrano/capistrano/issues/468

Had the same problem with 2.15.4. It was because I had changed my hostname to something invalid - everytime i su'd it told me 'unable to resolve host ' which this version of cap was picking up for some reason. Setting the hostname back to the proper setting seems to have sorted it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM