rails aborted! ActiveSupport::MessageEncryptor::InvalidMessage

Posted by Freddy Henderson

3 months ago

0

back-end db database active-record terminal rails git active-support

Error message:

bin/rails aborted! ActiveSupport::MessageEncryptor::InvalidMessage: ActiveSupport::MessageEncryptor::InvalidMessage /Users/Kit/code/<USERNAME>/<REPO_NAME>/config/environment.rb:5:in `<main>' Tasks: TOP => db:drop:_unsafe => db:load_config => environment (See full trace by running task with --trace)


Run the following in the terminal:
rm -rf config/credentials.yml.enc

EDITOR="mate --wait" bin/rails credentials:edit
Issue came up after another student changed the credentials.yml.enc file and pushed to master. Resets the file and sorts it out