Hello world,
I’ve been trying to remove the Akismet anti spam plugin, because it seems that it’s not RGPD compliant ; the analysis of data in overseas servers seems to be, per our legal team, illegal in regards to the RGPD.
Anyways, I’ve followed the instructions to uninstall it, and took the following steps ;
- Deactivate the plugin in the forum’s settings,
- Connect to the docker container with
./launcher enter app
- Run the command
bundle exec rake akismet_uninstall:delete_reviewables
- Get the following error message ;
root@forum:/var/www/discourse# bundle exec rake akismet_uninstall:delete_reviewables
rake aborted!
ActiveRecord::NoDatabaseError: We could not find your database: discourse. Which can be found in the database configuration file located at config/database.yml.
To resolve this issue:
- Did you create the database for this app, or delete it? You may need to create your database.
- Has the database name changed? Check your database.yml config has the correct database name.
To create your database, run:
bin/rails db:create
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/postgresql_adapter.rb:81:in `rescue in new_client'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/postgresql_adapter.rb:77:in `new_client'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in `public_send'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in `new_connection'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:700:in `checkout_new_connection'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:679:in `try_to_checkout_new_connection'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:640:in `acquire_connection'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:341:in `checkout'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in `connection'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/connection_handler.rb:211:in `retrieve_connection'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_handling.rb:313:in `retrieve_connection'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_handling.rb:280:in `connection'
/var/www/discourse/lib/site_settings/db_provider.rb:58:in `table_exists?'
/var/www/discourse/lib/site_settings/db_provider.rb:14:in `all'
/var/www/discourse/lib/site_settings/defaults_provider.rb:30:in `db_all'
/var/www/discourse/lib/site_setting_extension.rb:285:in `block in refresh!'
/var/www/discourse/lib/site_setting_extension.rb:278:in `synchronize'
/var/www/discourse/lib/site_setting_extension.rb:278:in `refresh!'
/var/www/discourse/lib/site_setting_extension.rb:549:in `block in setup_methods'
/var/www/discourse/lib/site_setting_extension.rb:447:in `public_send'
/var/www/discourse/lib/site_setting_extension.rb:447:in `get'
/var/www/discourse/plugins/discourse-saml/plugin.rb:32:in `setting'
/var/www/discourse/plugins/discourse-saml/lib/saml_authenticator.rb:17:in `setting'
/var/www/discourse/plugins/discourse-saml/lib/saml_authenticator.rb:337:in `enabled?'
/var/www/discourse/lib/plugin/instance.rb:767:in `block in auth_provider'
/var/www/discourse/lib/plugin/instance.rb:514:in `block in notify_before_auth'
/var/www/discourse/lib/plugin/instance.rb:514:in `each'
/var/www/discourse/lib/plugin/instance.rb:514:in `notify_before_auth'
/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:14:in `each'
/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:14:in `initialize'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.3.1/lib/action_dispatch/middleware/stack.rb:37:in `new'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.3.1/lib/action_dispatch/middleware/stack.rb:37:in `build'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.3.1/lib/action_dispatch/middleware/stack.rb:166:in `block in build'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.3.1/lib/action_dispatch/middleware/stack.rb:162:in `each'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.3.1/lib/action_dispatch/middleware/stack.rb:162:in `inject'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.3.1/lib/action_dispatch/middleware/stack.rb:162:in `build'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/engine.rb:516:in `block in app'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/engine.rb:512:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/engine.rb:512:in `app'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/application/finisher.rb:52:in `block in <module:Finisher>'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/initializable.rb:32:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/initializable.rb:32:in `run'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/initializable.rb:60:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/application.rb:372:in `initialize!'
/var/www/discourse/config/environment.rb:7:in `<main>'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:38:in `require'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/application.rb:348:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/application.rb:511:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Caused by:
PG::ConnectionBad: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: Peer authentication failed for user "discourse"
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/pg-1.4.5/lib/pg/connection.rb:632:in `async_connect_or_reset'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/pg-1.4.5/lib/pg/connection.rb:760:in `connect_to_hosts'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/pg-1.4.5/lib/pg/connection.rb:695:in `new'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/pg-1.4.5/lib/pg.rb:69:in `connect'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/postgresql_adapter.rb:78:in `new_client'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in `public_send'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in `new_connection'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:700:in `checkout_new_connection'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:679:in `try_to_checkout_new_connection'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:640:in `acquire_connection'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:341:in `checkout'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in `connection'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_adapters/abstract/connection_handler.rb:211:in `retrieve_connection'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_handling.rb:313:in `retrieve_connection'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/connection_handling.rb:280:in `connection'
/var/www/discourse/lib/site_settings/db_provider.rb:58:in `table_exists?'
/var/www/discourse/lib/site_settings/db_provider.rb:14:in `all'
/var/www/discourse/lib/site_settings/defaults_provider.rb:30:in `db_all'
/var/www/discourse/lib/site_setting_extension.rb:285:in `block in refresh!'
/var/www/discourse/lib/site_setting_extension.rb:278:in `synchronize'
/var/www/discourse/lib/site_setting_extension.rb:278:in `refresh!'
/var/www/discourse/lib/site_setting_extension.rb:549:in `block in setup_methods'
/var/www/discourse/lib/site_setting_extension.rb:447:in `public_send'
/var/www/discourse/lib/site_setting_extension.rb:447:in `get'
/var/www/discourse/plugins/discourse-saml/plugin.rb:32:in `setting'
/var/www/discourse/plugins/discourse-saml/lib/saml_authenticator.rb:17:in `setting'
/var/www/discourse/plugins/discourse-saml/lib/saml_authenticator.rb:337:in `enabled?'
/var/www/discourse/lib/plugin/instance.rb:767:in `block in auth_provider'
/var/www/discourse/lib/plugin/instance.rb:514:in `block in notify_before_auth'
/var/www/discourse/lib/plugin/instance.rb:514:in `each'
/var/www/discourse/lib/plugin/instance.rb:514:in `notify_before_auth'
/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:14:in `each'
/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:14:in `initialize'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.3.1/lib/action_dispatch/middleware/stack.rb:37:in `new'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.3.1/lib/action_dispatch/middleware/stack.rb:37:in `build'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.3.1/lib/action_dispatch/middleware/stack.rb:166:in `block in build'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.3.1/lib/action_dispatch/middleware/stack.rb:162:in `each'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.3.1/lib/action_dispatch/middleware/stack.rb:162:in `inject'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/actionpack-7.0.3.1/lib/action_dispatch/middleware/stack.rb:162:in `build'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/engine.rb:516:in `block in app'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/engine.rb:512:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/engine.rb:512:in `app'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/application/finisher.rb:52:in `block in <module:Finisher>'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/initializable.rb:32:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/initializable.rb:32:in `run'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/initializable.rb:60:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/application.rb:372:in `initialize!'
/var/www/discourse/config/environment.rb:7:in `<main>'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.6.6/lib/zeitwerk/kernel.rb:38:in `require'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/application.rb:348:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/application.rb:511:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => akismet_uninstall:delete_reviewables => environment
(See full trace by running task with --trace)
How could I tell the plugin to use the Discourse database ?
Cheers,