I'm currently using an initializer to load a config.yml file into an AppConfig hash which offers access to variables for the environment. For production I am using environmental variables set on the server. I am using the following code to fallback to the config variable if the environmental variables are not set (i.e in development and test).
ENV['FACEBOOK_API_KEY'] || AppConfig['facebook_api_key']
My problem is that I need some of these variables to be available in the environment-specific file (development.rb/production.rb etc), but this file is loaded before the initialzers. How should I deal with this?