عند ترقية منصتي Discourse، اكتشفت أنها لا تعمل بشكل صحيح. أستطيع رؤية صفحة التصنيفات، لكن لا يمكنني قراءة الصفحة الرئيسية أو صفحة آخر المواضيع، مثل صفحة آخر المواضيع:
root@HFT-app:/var/www/discourse# rails c
[1] pry(main)> PluginStore.where(plugin_name: 'discourse-data-explorer').delete_all
NoMethodError: undefined method `where' for PluginStore:Class
Did you mean? when
from (pry):1:in `__pry__'
[2] pry(main)>
إذا كنت تقصد سجلات عملية إعادة البناء، فإليك رسالة الخطأ عند إعادة البناء (جميع الكلمات الحمراء موجودة هنا).
2020/07/14 11:33:39 socat[26] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
#------
2020-07-14 11:33:42.023 UTC [49] LOG: database system is ready to accept connections
I, [2020-07-14T11:33:46.972466 #1] INFO -- :
I, [2020-07-14T11:33:46.972792 #1] INFO -- : > su postgres -c 'createdb discourse' || true
2020-07-14 11:33:47.025 UTC [62] postgres@postgres ERROR: database "discourse" already exists
2020-07-14 11:33:47.025 UTC [62] postgres@postgres STATEMENT: CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR: database "discourse" already exists
I, [2020-07-14T11:33:47.026573 #1] INFO -- :
I, [2020-07-14T11:33:47.026936 #1] INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2020-07-14 11:33:47.083 UTC [73] postgres@discourse ERROR: role "discourse" already exists
2020-07-14 11:33:47.083 UTC [73] postgres@discourse STATEMENT: create user discourse;
ERROR: role "discourse" already exists
فقط إذا كان لديك نسخة احتياطية كاملة ومُؤَكَّدَة لقاعدة بياناتك الحالية ومجلد التحميلات (uploads)، يمكنك نقل أو نسخ تلك النسخة (تلك النسخ) خارج المجلد المشترك، على سبيل المثال (مع تكييف الأمر حسب إعداداتك):
mv /var/discourse/shared /tmp
تأكد أولاً من وجود نسخ احتياطية كاملة لقاعدة البيانات، بطبيعة الحال.