I am having some problems while loading a configuration file in YAML. I have added the fo开发者_开发问答llowing code in my application.rb
file.
AppConfig.setup do |config|
config[:env] = Rails.env
config[:uri] = "yaml://#{Rails.root}/config/app_config.yml"
end
But when I try to run the server, it shows the following error.
bad URI(is not URI?): yaml:///path_to_project/config/app_config.yml (URI::InvalidURIError)
How do I fix this problem?
I use the stable solution on production last 2 years called configatron
精彩评论