rails
rails copied to clipboard
Sprockets::FileOutsidePaths
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.
The error doesn't always appear. Just in some commits. I haven't found any relationship though.
Also related to #70
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.