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
I believe a setting regex needs updating, and want to test with a new value, but when I go SiteSetting.key = value it blocks me because of the regex. Is there a way to force update a value even if it doesn’t match the setting’s regex?
Edit: this worked, though be very careful!
cd /var/discourse/
./launcher enter app
rails db
discourse=> update site_settings set value='newvalue' where name='settingname';
혹시 모를 경우를 대비해, Discourse를 재시작하지 않고 실행할 수 있는 셸 스크립트 원라이너를 공유합니다: bundle exec rails runner "SiteSetting.set('enable_sso', false)". Discourse 관리자 UI에서 실행하는 것과 동일한 방식으로 작동합니다.