开发者

Problems while loading configuration files in Ruby on Rails

开发者 https://www.devze.com 2023-03-22 12:25 出处:网络
I am having some problems while loading a configuration file in YAML. I have added the fo开发者_开发问答llowing code in my application.rb file.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消