capistrano / rails

Official Ruby on Rails specific tasks for Capistrano
http://www.capistranorb.com/
MIT License
864 stars 270 forks source link

Sprockets::FileOutsidePaths #217

Open itay-grudev opened 6 years ago

itay-grudev commented 6 years ago

I am using sprockets (4.0.0.beta6) and I encounter the following error during deployment while precompiling assets:

Sprockets::FileOutsidePaths: /home/deploy/app/releases/ACTIVE_RELEASE_PATH/app/assets/images/image.svg is no longer under a load path:
/home/deploy/app/releases/NEW_RELEASE_PATH/app/assets/images,
/home/deploy/app/releases/NEW_RELEASE_PATH/app/assets/javascripts,
/home/deploy/app/releases/NEW_RELEASE_PATH/app/assets/stylesheets,
/home/deploy/app/releases/NEW_RELEASE_PATH/vendor/assets/javascripts,
/home/deploy/app/releases/NEW_RELEASE_PATH/vendor/assets/stylesheets,

As shown, the inconsistency is in the release paths used.

itay-grudev commented 6 years ago

The error doesn't always appear. Just in some commits. I haven't found any relationship though.

itay-grudev commented 6 years ago

Also related to #70

trusche commented 6 years ago

I'm encountering the same with sprockets 4.0.0.beta6 and latest Capistrano 3.10.1. It seems to have something to do with caching if that's using a shared directory (which it is in my case - releases/REVISION/tmp/cache is a symlink to shared/tmp/cache. Clearing the cache gets around the deploy error, but it's obviously not a permanent solution.