Home Rails 配置项 figaro
Post
Cancel

Rails 配置项 figaro

参考:  https://github.com/laserlemon/figaro

跟  rails-settings 很相似

用法:

gem 'figaro'

$ bundle exec figaro install

然后就会生成 config/application.yml

host: 'localhost'
port '3306'

puts ENV['host'] # => localhost

This post is licensed under CC BY 4.0 by the author.