# stick this in some kind of initializer code like config/environment.rb APP_CONFIG = YAML.load_file("#{Rails.root}/config/app_config.yml") # to make it environment specific APP_CONFIG = YAML.load_file("#{Rails.root}/config/app_config.yml")[Rails.env] # sample yaml : <<-YAML # put this in config/app_config.yml development: api_key: abcdefg production: api_key: 1234567 YAML # then you can access like this: api_key = APP_CONFIG['api_key']