Why am I getting a WARNING: missing key error?

I am using figaro and have a config/application.yml

. In it, I indicate the development as such:

development:
  FACEBOOK_SECRET: '***'
  FACEBOOK_KEY: '***'
  PARSE_APP_ID: '***'
  PARSE_API_KEY: '***'

      

I am using the parse-ruby-client gem to make parsing push notifications. It is configured inconfig/initializers/parse.rb

require 'parse-ruby-client'

Parse.init :application_id => ENV['PARSE_APP_ID'],
           :api_key        => ENV['PARSE_API_KEY'],
           :quiet           => false

      

When I start my server or my worker sidekiq, I get this warning:

WARNING: Skipping key "PARSE_APP_ID". Already set in ENV.
WARNING: Skipping key "PARSE_API_KEY". Already set in ENV.

      

But I don't get this warning for FACEBOOK_SECRET

or FACEBOOK_KEY

. Also, I've read about the error and still don't quite get it.

How PARSE_APP_ID

and PARSE_API_KEY

already installed in ENV? When and where is this set?

Googling for the "skipped warning key already set in env" doesn't tell me much. The first github link talks about how to remove the warning. I feel like if I get it right, there should be no warning

+3


source to share


1 answer


I know what my problem is. I was setting variables in my bash_profile. After I removed it and moved it to application.yml the source ~ / .bash_profile will not reset the ENV variable. You must start a new shell.



+2


source







All Articles