David Kimura PRO said almost 6 years ago on Encrypted Credentials in Rails 5.2 :
You're best bet would be to upgrade to Rails 5.1.X if possible and use the encrypted secrets. It will at least get the code base up to a point where swapping out the encrypted secrets for credentials an easier task.