Nikolay
(Nikolay)
23 يناير 2020، 10:35ص
1
مرحبًا، لا أستطيع التطوير على نظام ويندوز لأنني أحصل على شاشة فارغة. عند فتح وحدة التحكم، تظهر هذه الأخطاء:
(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
وكثير من الأخطاء المماثلة.
إذًا، بشكل أساسي، لا يمكن لـ Discourse تحميل السكربتات. عندما أفتح السكربت في نافذة منفصلة، أحصل على الخطأ التالي:
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')")
لذلك بدأت بالبحث، وادركت أن المشكلة تكمن في Sprockets. لقد قمت بربط مجلد Discourse من نظام ويندوز إلى Docker، ونظام الملفات غير حساس لحالة الأحرف. ويبدو أن Sprockets يعمل فقط على أنظمة الملفات الشبيهة بـ Linux (مثل ext4) والتي يمكنها جعل المجلدات حساسة لحالة الأحرف.
هل توجد أي حل لهذه المشكلة؟
شكرًا
تحديث: هذه المشكلة المتعلقة بـ Sprockets موثقة على GitHub: FileStore cache patch in v3.6 causes directory name collisions in Windows · Issue #283 · rails/sprockets · GitHub
لكن المشكلة لا تزال مفتوحة، ولا يوجد حل
sam
(Sam Saffron)
28 يناير 2020، 6:36ص
2
من المضحك أن @pixeltrix صادف هذا أمس واستخدم هذه الحيلة لتجاوز المشكلة:
committed 12:09PM - 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.
أنصحك فقط بتثبيت WSL2 واستخدام إعدادات WSL2 الخاصة بنا، فهي أسرع وأسهل في الفهم:
This tutorial has been tested on Windows 10 and 11.
To set up a development environment for Discourse on Windows, you can do it using Windows Subsystem for Linux feature.
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 18.04, and not 20.04 since some installations will fail on 20.04. For m…
تثبيت بيئة التطوير أمر بسيط؛ كل ما عليك فعله هو تشغيل WSL2، تثبيت Docker، ثم استخدام إعدادات Docker للتطوير الخاصة بنا.
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.
See also Developing Discourse using a Dev Container …
Nikolay
(Nikolay)
28 يناير 2020، 10:10ص
3
شكرًا جزيلاً لك. لقد نجح الحل.
في وقت لاحق سأحاول استخدام WSL2