SECRET_KEY_BASE missing error on production while I have placed secret token export command in .profile and .bashrc
my export command is like this:
export SECRET_KEY_BASE=21021dd33712b563e*******************
in pumma access logs it shows me this error
2015-12-23 06:32:28 -0500: Rack app error: #<RuntimeError: Missing `secret_token` and `secret_key_base` for 'production' environment, set these values in `config/secrets.yml`>
/home/deploy/apps/pulsemedia/shared/bundle/ruby/2.2.0/gems/railties- 4.2.5/lib/rails/application.rb:534:in `validate_secret_key_config!'
/home/deploy/apps/pulsemedia/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:246:in `env_config'
/home/deploy/apps/pulsemedia/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/engine.rb:514:in `call'
/home/deploy/apps/pulsemedia/shared/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:165:in `call'
/home/deploy/apps/pulsemedia/shared/bundle/ruby/2.2.0/gems/puma-2.15.3/lib/puma/configuration.rb:79:in `call'
/home/deploy/apps/pulsemedia/shared/bundle/ruby/2.2.0/gems/puma-2.15.3/lib/puma/server.rb:541:in `handle_request'
/home/deploy/apps/pulsemedia/shared/bundle/ruby/2.2.0/gems/puma-2.15.3/lib/puma/server.rb:388:in `process_client'
/home/deploy/apps/pulsemedia/shared/bundle/ruby/2.2.0/gems/puma-2.15.3/lib/puma/server.rb:270:in `block in run'
Here is my secrets.yml file
production:
secret_key_base: <%= ENV['SECRET_KEY_BASE'] %>
I try ENV['SECRET_KEY_BASE'] in rails console production it shows me key there but I don't know whats happening.
Note: I am using rails 4.2.1
.profileor.bashrcfiles. - Jon