Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 (i.e. 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

like image 607
aardvarkk Avatar asked May 07 '13 04:05

aardvarkk


People also ask

What is assets precompile in Rails?

By default, Rails uses CoffeeScript for JavaScript and SCSS for CSS. DHH has a great introduction during his keynote for RailsConf. The Rails asset pipeline provides an assets:precompile rake task to allow assets to be compiled and cached up front rather than compiled every time the app boots.

What is the Rails asset pipeline?

1 What is the Asset Pipeline? The asset pipeline provides a framework to concatenate and minify or compress JavaScript and CSS assets. It also adds the ability to write these assets in other languages and pre-processors such as CoffeeScript, Sass, and ERB.


1 Answers

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

like image 125
BvuRVKyUVlViVIc7 Avatar answered Sep 23 '22 15:09

BvuRVKyUVlViVIc7