Skip to content

Commit

Permalink
Fix IO error
Browse files Browse the repository at this point in the history
```
- Rake assets install
  - Detected rake (`rake` gem found, `Rakefile` found at `/workspace/Rakefile`)
  - Running `bundle exec rake -P --trace` .... (1.6s)
  - Compiling assets with cache (detected `rake assets:precompile` and `rake assets:clean` via `bundle exec rake -P`)
  - Loading cache for /workspace/public/assets
  - Loading cache for /workspace/tmp/cache/assets
  - Running `bundle exec rake assets:precompile assets:clean --trace`

      ** Invoke assets:precompile (first_time)
      ** Invoke assets:environment (first_time)
      ** Execute assets:environment
      ** Invoke environment (first_time)
      ** Execute environment
      ** Execute assets:precompile
      ** Invoke assets:clean (first_time)
      ** Invoke assets:environment 
      ** Execute assets:clean

  - Done (1.1s)
  - Storing cache for /workspace/public/assets
  - Storing cache for /workspace/tmp/cache/assets
- Debug info
  - Could not move files out of the application to the cache.
    From: /workspace/tmp/cache/assets To: /layers/heroku_ruby/cache_tmp_cache_assets
    Error: creating directory: /layers/heroku_ruby/cache_tmp_cache_assets/sprockets: File exists (os error 17)

! Error caching frontend assets
!
! An error occurred while attempting to cache frontend assets, and the Ruby buildpack
! cannot continue.
!
! Ensure that the permissions on the files in your application directory are correct and that
! all symlinks correctly resolve.

ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 51
Error: Process completed with exit code 1.
0s
```
  • Loading branch information
schneems committed Oct 16, 2024
1 parent 3765c35 commit 512ac44
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions commons/src/cache/app_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ impl AppCache {
fs_err::create_dir_all(&self.cache).map_err(CacheError::IoError)?;

cp_r::CopyOptions::new()
.create_destination(true)
// Do not overwrite
.filter(|to_file, _| {
let destination = self.path.join(to_file);
Expand Down Expand Up @@ -274,7 +273,6 @@ pub fn build<B: libcnb::Buildpack>(
/// - If the copy command fails an io error will be raised.
fn preserve_path_save(store: &AppCache) -> Result<&AppCache, CacheError> {
cp_r::CopyOptions::new()
.create_destination(true)
.copy_tree(&store.path, &store.cache)
.map_err(|error| CacheError::CopyAppToCacheError {
path: store.path.clone(),
Expand All @@ -296,7 +294,6 @@ fn preserve_path_save(store: &AppCache) -> Result<&AppCache, CacheError> {
/// - If the move command fails an io error will be raised.
fn remove_path_save(store: &AppCache) -> Result<&AppCache, CacheError> {
cp_r::CopyOptions::new()
.create_destination(true)
.copy_tree(&store.path, &store.cache)
.map_err(|error| CacheError::DestructiveMoveAppToCacheError {
path: store.path.clone(),
Expand Down

0 comments on commit 512ac44

Please sign in to comment.