Capistrano deploy fails due to missing manifest file when using assets prefix

asset-pipeline, capistrano, ruby-on-rails-3

Solution

My suspicion was right: this was a problem with the renamed asset directory. Cap didn't know to look in `public/some_other_path` instead of `public/assets`.

In other words, because this line is in my `application.rb`:

config.assets.prefix = "some_other_path"

I had to add this line to my `deploy.rb`:

set :assets_prefix, "some_other_path"

Then, Cap knows where to look for a manifest, copies it into `shared/assets`, and finishes correctly.

It'd be handy to have the `deploy.rb` reference the `config` variable instead of having to hard-code the path a second time, but that's outside the scope of this question.

Problem

I've just set up a Capistrano deploy for our application and I keep running into this error: ``` * executing ["ls /path/to/app/shared/assets/manifest*"] servers: ["web03"] [web03] executing command [err :: web03] ls: /path/to/app/shared/assets/manifest* [err :: web03] : No such file or directory ``` If I manually create a manifest file with `touch /path/to/app/shared/assets/manifest.yml`, the deploy script works fine. However, this feels all sorts of sketchy. I've googled the heck out of this and the most I can gather is that the manifest file it's looking for is a product of the asset pipeline. I checked and I do, in fact, have the pipeline enabled (`config.assets.enabled = true`), so I'm at a loss. Could someone please help me understand 1) what this manifest file is and how it's created; and 2) why isn't one being created for my application? Update: I think I'm closing in on the answer and I think it has something to do with this line: ``` config.assets.prefix = "/some_other_path" ``` We needed to rename the "asset" path because we have Asset objects in our system and I'm guessing Cap might be getting confused because of it. Any suggestions?

Original source