0

我正在使用这个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
4

1 回答 1

5

弄清楚为什么我必须像这样在注册 Sinatra::ConfigFile 之后设置它:

 register Sinatra::ConfigFile   
 set :environments, %w{development test production staging}
 config_file 'config/config.yml'
于 2013-01-10T12:23:15.117 回答