How can I make a custom environment in rails a default environment?

前端 未结 3 1567
無奈伤痛
無奈伤痛 2021-02-10 09:19

i created a custom staging environment in my rails app by adding new file config/environments/staging.rb, same as config/environments/development

3条回答
  •  一向
    一向 (楼主)
    2021-02-10 10:05

    You can try this in your application.rb after Bundler.require statement

    ENV['RAILS_ENV'] ||= 'staging'
    

提交回复
热议问题