Search code examples
ruby-on-railsruby-on-rails-5ruby-on-rails-5.2

Rails 5.2 encrypted credentials not saving


When I do bin/rails credentials:edit my editor opens a file like credentials.yml.enc.1234 with default content. After I'm done editing, I hit save, and the console reads New credentials encrypted and saved.

After I run bin/rails credentials:edit again, another temp file gets opened (credentials.yml.enc.4321) and the contents are back to default.

How can I make the credentials persist?


Solution

  • There is an issue related to this: https://github.com/rails/rails/issues/31286

    It's been fixed already in 5.2.0.rc1