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?
Per chi amministra Discourse solo occasionalmente, per i principianti o, in generale, per risparmiare tempo, è molto utile essere il più specifici possibile.
In questo caso specifico, dove si trova esattamente il file app.yml? Non ne vedo uno in /var/discourse, ma ne vedo uno chiamato app-sparkpost.yml. Forse è il file che ho creato circa 5 anni fa quando ho distribuito l’istanza; non ne sono sicuro. È questo il percorso corretto? Come fa Discourse a sapere di dover leggere questo file se non c’è nessun app.yml in /var/discourse?
Non mi aspetterei di trovare file YAML in /var/discourse stesso, no. Il percorso corretto sarebbe /var/discourse/containers. Credo che Discourse legga tutti i file nella directory containers, ma un ingegnere sarà meglio attrezzato per rispondere a questa domanda rispetto a me. Non penso che il nome abbia davvero importanza.
Credo che app.yml si trovi in /var/discourse/containers/app.yml. Dovrai modificare quel file ed eliminare tutti i riferimenti al plugin. Dovresti essere in grado di trovare qualcosa di simile al seguente esempio nel file:
## I plugin vanno qui
## vedi https://meta.discourse.org/t/19157 per i dettagli
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
Ogni riga git clone qui si riferisce a un plugin installato nell’istanza di Discourse. Dopo aver modificato il file, dovrai ricostruire la tua applicazione Discourse. Dalla cartella /var/discourse puoi eseguire ./launcher rebuild app per ricostruire la tua applicazione Discourse.