我正在使用this gem 它适用于生产环境和开发,但不用于升级:
这是main.rb
set :environments, %w{development test production staging}
config_file 'config/config.yml'
和config / config.yml
development: &development
sub1:
pay_to_email: test1@gmail.com
test:
<<: *development
staging:
<<: *development
production:
<<: *development
答案 0 :(得分:5)
想出为什么我必须在寄存器Sinatra :: ConfigFile之后设置它 像这样:
register Sinatra::ConfigFile
set :environments, %w{development test production staging}
config_file 'config/config.yml'