Missing encryption key to decrypt a file. RAILS_ENV=production bin/rails c

61 views Asked by At

I tried deploying a ruby on rails app using capistrano and i'm currently having an issue with production env keys. It says Missing encryption key to decrypt file with. Ask your team for your master key and write it to config/credentials/production.key or put it in the ENV['RAILS_MASTER_KEY']. I have secrets.yml file containing

development:
  secret_key_base:xxxx

test:
  secret_key_base: xxxx


production:
  secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> 

I also have a master.key but don't have production.key. i do have production.yml.enc though. I am new to this and i don't know what did i do wrong here.

I deleted and created a whole new credentials.yml.enc and master.key and it works in test and development environment but not in production.

0

There are 0 answers