Nikolay
(Nikolay)
January 23, 2020, 10:35am
1
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
sam
(Sam Saffron)
January 28, 2020, 6:36am
2
Funny @pixeltrix
came across this yesterday and used this hack to work around it:
committed 12:05PM - 27 Jan 20 UTC
Sprockets 3.0 and later uses Base64 digests for cache paths and these
present pr… oblems when used with NTFS on Windows which is case-insensitive.
By allowing the overriding of the cache path from an environment variable
we can use a Docker volume to cache the asset compilation. This is actually
faster on both Mac and Windows than the default path.
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.
Developing using Docker
Since Discourse runs in Docker, you should be able to run Discourse directly from your source directory using a Discourse development container.
Pros: No need to install any system dependencies, no configuration needed at all for setting up a development environment quickly.
Cons: Will be slightly slower than the native dev environment on Ubuntu, and much slower than a native install on MacOS.
Step 1: Install Docker
Ubuntu
curl -fsSL https://d…
4 Likes
Nikolay
(Nikolay)
January 28, 2020, 10:10am
3
Thank you very much. Hack worked.
Later i will try to use WSL2
1 Like