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:
https://github.com/alphagov/e-petitions/commit/98f288501f5b9c8b6347c1c6009da7218ec7bea2
I recommend just installing WSL2 and using our WSL2 setup which is far faster and easier to reason about:
This tutorial has been tested on Windows 10 and 11.
So you want to set up a development environment for Discourse on Windows 10 (or windows 11)? You can do it easily using Windows Subsystem for Linux feature. It is faster too .
This setup requires the WSL 2 installation. It is only available in Windows 10 builds 18917 or higher. We’ll assume that you already installed Windows Subsystem for Linux 2 (Ubuntu) on your Windows 10 system. WARNING: Install Ubuntu 1…
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:/…
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