rails credentials:edit blows up

I have a fairly basic Rails 5.2 app, built from scratch. When I type:

rails credentials:edit

It blows up with a stack trace that ends with:

/Users/pitosalas/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/message_encryptor.rb:206:in `rescue in _decrypt’: ActiveSupport::MessageEncryptor::InvalidMessage (ActiveSupport::MessageEncryptor::InvalidMessage)

Any idea? Thanks!

Additional info:

  • When I do a rails new with the same versions of everything, it works as advertised. I can do rails credentials:edit and it does just what the doc says it should. That tells me that my setup and config are good. But then I do a simple rails new and that works as adversed.

  • I diffed the rails app that doesn’t work with the brand new one (the one alluded to in my OP) with the one that does (referring to the one in the bullet above) and nothing .jumps out at me.