The discussion revolves around completely uninstalling and removing a plugin from a Discourse installation. will_io is experiencing issues with a plugin and wants to remove it entirely. jomaxro suggests removing the plugin line from the app.yml file and rebuilding the site via ./launcher rebuild app. However, ariznaf raises a concern that this method may not remove database entries created by the plugin.
MarcP shares a similar issue with the Fingerprint plugin, which won’t uninstall despite removing it from app.yml. frold suggests rebuilding and clearing the local cache, but MarcP confirms that these steps have been taken.
ddelrio1986 provides detailed instructions on removing plugins by editing the app.yml file located at /var/discourse/containers/app.yml. To remove a plugin, users need to delete the corresponding git clone line and rebuild the Discourse application using ./launcher rebuild app.
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?
For those who only administer Discourse occasionally, or newbies, or in general to save time, it’s most helpful to be as specific as possible.
In this particular case, where exactly is the app.yml file? I don’t see one in /var/discourse, but I do see an app-sparkpost.yml. Maybe that’s the file I created ~5 years ago when I deployed the instance; I don’t know. Is that the right path? How does discourse knows to read this file if there’s no app.yml in /var/discourse?
I wouldn’t expect to find any yaml files at /var/discourse itself, no. The correct path would be /var/discourse/containers. I believe Discourse will read all files in the containers directory, but an engineer will be better equipped to answer this than me. I don’t think the name actually matters.
I believe the app.yml can be found at /var/discourse/containers/app.yml. You will need to edit that file and remove any references to the plugin. You should be able to locate something similar to the following in the file:
## 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
Each of the git clone lines there refers to a plugin installed in the Discourse instance. After editing the file you will need to rebuild your Discourse application. From the /var/discourse folder you can run ./launcher rebuild app to rebuild your Discourse application.