Github actions & RAILS_MASTER_KEY
Hey Chris, hey community,
I've been following along your guide on setting up GitHub-actions with Rails (https://gorails.com/episodes/github-actions-continuous-integration-ruby-on-rails), however I'm facing an issue in one of the last steps, namely "# Build and run tests":
rails aborted!
ActiveSupport::MessageEncryptor::InvalidMessage: ActiveSupport::MessageEncryptor::InvalidMessage
/home/runner/work/my-project/my-project/config/environment.rb:5:in `<main>'
/home/runner/work/my-project/my-project/bin/rails:9:in `<top (required)>'
/home/runner/work/my-project/my-project/bin/spring:15:in `require'
/home/runner/work/my-project/my-project/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Caused by:
ArgumentError: key must be 16 bytes
I am inferring that this has to do with my RAILS_MASTER_KEY-variable.
I double-checked the key which I stored in my project's ENV-variables and it happens to be 32 bytes. I am unsure about how to best proceed and I am hesitant to delete the key, in order to create a new one. Setting an option for the key to be legal with 32 bytes would be much preferable in my book - it's just that I wouldn't know how and where...
Any thoughts on how to solve this issue?
Thanks in advance,
Dominik