Ah, I did it a different route, but yours is easier.
I ended up doing
s = SiteSetting.find_by(name: 'enable_sso')
s.value = 'f'
s.save!
I was just about to post that here and saw your response. Thanks! Now I can at least constantly get back to a good state between tests (or maybe I should setup an actual SSO…)
URGENT: FATAL: Peer authentication failed for user “discourse”
Failed to initialize site default
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in initialize': FATAL: Peer authentication failed for user "discourse" (PG::ConnectionBad) from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in new’
from /var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `connect’
…
… many folders list
…
I did ./launcher rebuild app and tried again. The same errors!
After I’d pissed of these problems. I did restored my droplet from a previous snapshot I had and started from scratch.
changing language can be done in database in site_settings column.
just search the current language and replace new language:
below code change language from Farsi to english: UPDATE site_setting SET value = 'en' where value = 'fa_IR'
I have typed this code after typing : rails db
Creo que es necesario actualizar una expresión regular de configuración y quiero probar con un nuevo valor, pero cuando intento SiteSetting.key = value el sistema me bloquea debido a la expresión regular. ¿Existe alguna forma de forzar la actualización de un valor aunque no coincida con la expresión regular de la configuración?
Edición: esto funcionó, ¡pero ten mucho cuidado!
cd /var/discourse/
./launcher enter app
rails db
discourse=> update site_settings set value='newvalue' where name='settingname';
Por si acaso, aquí tienes una línea de comando en shell que no requiere reiniciar Discourse: bundle exec rails runner "SiteSetting.set('enable_sso', false)". Funciona exactamente igual que desde la interfaz de administración de Discourse.