Problem with development on Windows with Docker and mounted volume

Hello, i cannot develop on windows, because get blank screen. When i open console i get this errors:

(X) ember_jquery.js?1579775136.5740232:1 Uncaught Error: Errno::EEXIST: File exists @ dir_s_mkdir - /var/discourse/tmp/cache/assets/sprockets/v3.0/pr
  (in /home/gaijinsailor/.rbenv/versions/2.6.2/lib/ruby/2.6.0/fileutils.rb:239:in `mkdir')
    at ember_jquery.js?1579775136.5740232:1

and alot of similar errors.

So, basically, discourse cannot load scripts. When i open script in separate window i get following error:

Script: http://localhost:3000/assets/locales/en_US.js?1579775136.5398135
Body: throw Error("Errno::EEXIST: File exists @ dir_s_mkdir - /var/discourse/tmp/cache/assets/sprockets/v3.0/x2\n  (in /home/gaijinsailor/.rbenv/versions/2.6.2/lib/ruby/2.6.0/fileutils.rb:239:in `mkdir')")

So i start digging, and i realized that problem is with sprockets. I mounted disourse dir from windows to docker, and filesystem is case insensitive. And sprockets seems like work only on linux like filesystems (like ext4) which can make dir case sensitive.

Is there any solution to this problem?
Thanks

UPD: this issue with sprockets is documented on github: https://github.com/rails/sprockets/issues/283
but issue is still open, and no solution :frowning:

Funny @pixeltrix came across this yesterday and used this hack to work around it:

I recommend just installing WSL2 and using our WSL2 setup which is far faster and easier to reason about:

Installation of dev environment is trivial, you just get WSL2 going, install docker, and then use our docker dev setup.

4 Likes

Thank you very much. Hack worked.
Later i will try to use WSL2

1 Like