Trouble with ActiveSupport::MessageEncryptor::InvalidMessage in plugin

Thanks, @gerhard!

So at Upgrading Ruby on Rails — Ruby on Rails Guides

I find

(but that says Rails 7.1?)

Is there some way that you know off the top of your head that I can ignore this change in my existing plugin with some obvious-once-you-know-it line in my plugin.rb?

Or maybe I’m going to have to figure out what this means.

EDIT: but on dev adding that line to config/application.rb is not a magic fix.

Sorry. I read a bit further:

So maybe that will solve my immediate problem. Thanks again for your help! Maybe I’ll get it this time.


Well, the key I generate for both rails 6 and rails 7 looks like this:

#<ActiveSupport::KeyGenerator:0x000055870212d4f8 @hash_digest_class=OpenSSL::Digest::SHA1, @iterations=65536, @secret="my-big-secret">

but they encrypt things differently. I was hoping that the hash_digest_class was the issue, but it at least looks like it’s the same on both, but the encrypted string is different. :crying_cat_face: