参考: https://github.com/laserlemon/figaro
跟 rails-settings 很相似
用法:
gem 'figaro'
$ bundle exec figaro install
然后就会生成 config/application.yml
host: 'localhost' port '3306'
puts ENV['host'] # => localhost
参考: https://github.com/laserlemon/figaro
跟 rails-settings 很相似
用法:
gem 'figaro'
$ bundle exec figaro install
然后就会生成 config/application.yml
host: 'localhost' port '3306'
puts ENV['host'] # => localhost