I
I
Infinite2016-05-14 13:35:56
Ruby on Rails
Infinite, 2016-05-14 13:35:56

Why does secret_key_base exist, but nginx still logs an error?

Good afternoon, I'm deploying a rails production server on nginx+passenger, set secret_key_base to .bashrc, but still the browser displays an error Incomplete response received from application , and in log nginx App 1247 stderr: [ 2016-05-14 06:32:41.8928 1342 /0x00000001d1fe88(Worker 1) utils.rb:87 ]: *** Exception RuntimeError in Rack application object (Missing `secret_token` and `secret_key_base` for$ what else could be the cause?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Karim Kyatlottyavi, 2016-05-14
@constXife

1. Check the RAILS_ROOT/config/secrets.yml file and make sure everything is set up there correctly

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

2. Check that you have the same ENV names in .bashrc
3. Check that your rails application is launched in the appropriate mode - production
As a last resort, just enter the secret_key into the config manually as a line, without ENV.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question