crypt_keeper: Delayed job: ActiveSupport::MessageEncryptor::InvalidMessage
Hey folks, I’ve got a crypt_keepered model that is called in a delayed_job. It runs fine in development with perform_now
and perform_later
. On Heroku however, it fails with just perform_later
…
I thought it might be an issue with getting the key/salt from the ENV. So I tried ENV[“KEY”], ENV.fetch(“KEY”) and also by using Rails secrets but I’m not sure this is the problem.
Any ideas what might be causing this?
Thanks! Rikki
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (5 by maintainers)
Hi @vishaldeepak, good question! I think I probably ended up just using the built in Rails encryption if I remember correctly!
https://guides.rubyonrails.org/active_record_encryption.html
I just created a really basic job that works with
perform_now
but notperform_later
on Heroku: