Ask A Question

Notifications

You’re not receiving notifications from this thread.

Github actions & RAILS_MASTER_KEY

karatepicke asked in Rails

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

Reply

I've hit this same issue deploying to render on another video, where you able to resolve the issue Dominik?

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,563+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.