2FA broken after update

I ran the update v2.4.0rc3 and changed my keys just in case - ie secret key base etc. But the last bit on . From RAILS_ENV=production bundle exec rails console (or docker-compose equivalent), run: User.update_all(otp_required_for_login: false, encrypted_otp_secret: nil)

trying any of thse lines generates errors - I cannot get this to work and thus cannot login to my instance because 2FA is broke with me changing the key. I’m using docker on this instance.

If I try to type rails c i get :

[!] There was an error parsing `Gemfile`: no implicit conversion of Symbol into Integer. Bundler cannot continue.

 #  from /home/mastodon/mastodon/Gemfile:4
 #  -------------------------------------------
 #  source 'https://rubygems.org'
 >  ruby '>= 2.3.0', '< 2.6.0'
 #  -------------------------------------------

This resolved my issue:

Well spoke too soon - it allowed me to login now as it turned off all 2FA but now when I go to setup 2FA again I get the web error: We’re sorry, but something went wrong on our end.

It sounds like you have the wrong version of Ruby installed (from system package instead of a more modern one like 2.5.1 or 2.4.5) which is the reason for the There was an error parsing Gemfile error. Were you following the documentation to install?

Please consult logs for stacktraces before saying that you get a web error. There is nothing anyone can do with that information alone.