Missing `secret_key_base` for 'production' environment ROR version 7

33 Views Asked by At

I am trying to deploy my ROR(v7) app on a VPS using Nginx and Passenger. I am getting this error from Passenger:

Error: The application encountered the following error: Missing secret_key_base for 'production' environment, set this string with bin/rails credentials:edit (ArgumentError)

I have used RAILS_ENV=production EDITOR=nano rails credentials:edit to edit the credentials which takes me to /tmp/91086.credentials.yml:

# Used as the base secret for all MessageVerifiers in Rails, including the one protecting cookies.
secret_key_base: (blah blah)
production:
  secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

I don't know why it is still saying this, what am I doing wrong?

0

There are 0 best solutions below