0

I'm running a Rails app using Docker on Windows with WSL 1.

Sometimes after cleaning up among Docker volumes, I get this error after restarting the app. The error message is "File exists @ dir_s_mkdir - /myapp/tmp/cache/assets/sprockets/v4.0.0/3A".

henrik242
  • 366
  • 4
  • 11

1 Answers1

0

It happens because sprockets (responsible for the asset pipeline) cannot successfully write the cache folder, in this case "tmp/cache/assets/sprockets/v4.0.0/3A" because another folder with almost the same name ("..../3a") already exists (same name, just with lowercase).

I've experienced this a couple of times, and while I'm not sure why case insensitivity is suddenly applied to directories under wsl-control, I've found a workaround here that resolves the issue.

Simply start a Windows Power Shell terminal as Administrator, and run this command from the app root: (Get-ChildItem -Recurse -Directory).FullName | ForEach-Object {fsutil.exe file setCaseSensitiveInfo $_ enable} and you're good to go.

henrik242
  • 366
  • 4
  • 11