Potreste provare queste due opzioni:
Modalità sviluppo, utilizzando un ambiente diverso per impostare il database:
SKIP_DB_AND_REDIS=1 DISCOURSE_DEV_DB='nonexistent' bin/rails runner "puts 'booted successfully'"
In modalità test, con i plugin caricati:
LOAD_PLUGINS=1 RAILS_ENV=test SKIP_DB_AND_REDIS=1 RAILS_DB='nonexistent' bin/rails runner "puts 'booted successfully'"