Here is the error when I try to bootstrap without the plugin.
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return # <Process::Status: pid 22379 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install -- deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}`
And then scrolled up I get this:
I, [2017-01-01T23:52:03.038385 #15] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
URGENT: type Failed to initialize site default
rake aborted!
ArgumentError: type
Handy with most things but I don’t know where to start with this because I bootstrap fine with the plugin.
Looks like df-core is the plugin at fault. Isn’t that one of the Discouse PRO plugins? It’s been a while since I looked at the code on those but if memory serves they contained db migrations. Not sure if that’s good or bad at the moment.
Is it possible that by removing the plugin (and thus removing the migrations) it’s throwing an error?
Для тех, кто администрирует Discourse лишь изредка, для новичков или просто для экономии времени, наиболее полезно быть как можно более конкретным.
В данном конкретном случае, где именно находится файл app.yml? Я не вижу его в /var/discourse, но вижу app-sparkpost.yml. Возможно, это тот файл, который я создал примерно 5 лет назад при развёртывании экземпляра; не знаю точно. Правильный ли это путь? Как Discourse узнает, что нужно прочитать этот файл, если в /var/discourse нет app.yml?
Я бы не стал ожидать найти какие-либо YAML-файлы непосредственно в /var/discourse. Правильный путь — /var/discourse/containers. Я полагаю, что Discourse будет читать все файлы в директории containers, но инженер сможет ответить на этот вопрос лучше меня. Мне кажется, что имя на самом деле не имеет значения.
Я полагаю, что файл app.yml находится по пути /var/discourse/containers/app.yml. Вам нужно открыть этот файл в редакторе и удалить все ссылки на плагин. В файле должно быть что-то похожее на следующее:
## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/discourse/discourse-jwt.git
- git clone https://github.com/zh99998/discourse-cross-origin.git
Каждая строка с git clone здесь соответствует плагину, установленному в экземпляре Discourse. После редактирования файла вам нужно пересобрать ваше приложение Discourse. Из папки /var/discourse выполните команду ./launcher rebuild app, чтобы пересобрать приложение Discourse.