1 $application_config = {}
3 %w(application.default application).each do |cfgfile|
4 path = "#{::Rails.root.to_s}/config/#{cfgfile}.yml"
6 yaml = ERB.new(IO.read path).result(binding)
7 confs = YAML.load(yaml)
8 $application_config.merge!(confs['common'] || {})
9 $application_config.merge!(confs[::Rails.env.to_s] || {})
13 Server::Application.configure do
15 $application_config.each do |k, v|
16 # "foo.bar: baz" --> { config.foo.bar = baz }
23 if cfg.respond_to?(k.to_sym) and !cfg.send(k).nil?
24 # Config must have been set already in environments/*.rb.
26 # After config files have been migrated, this mechanism should
27 # be deprecated, then removed.
29 # Config variables are not allowed to be nil. Make a "naughty"
30 # list, and present it below.
38 Refusing to start in #{::Rails.env.to_s} mode with missing configuration.
40 The following configuration settings must be specified in
41 config/application.yml: