无法重命名环境栏

时间:2015-11-12 09:41:28

标签: ruby-on-rails configuration

我没有正确命名我的导轨'环境:本地而不是开发和开发而不是分期 我现在正试图重命名它们。我更改了database.ymlsecret.ymlapplication.yml中的姓名。我还正确地重命名了环境文件夹中的文件 但当我尝试将我的代码推送到我的临时环境时,我得到:
         remote: ###### WARNING: remote: You are deploying to a non-production environment: "development".
而它应该是分期。有谁知道如何重命名环境?

1 个答案:

答案 0 :(得分:0)

Environment Variables

From the Rails docs:

ENV["RAILS_ENV"] defines the Rails environment (production, development, test, and so on) that Rails will run under.

The environment of your app should be set with the environment variables on your system.

Environment variables are variables stored in the OS of your system. Accessing them depends on which system you're using; they can mostly be set from the command line:

$ export RAILS_ENV="staging"

In Heroku, you can set what they call "config" vars (they're really environment vars) in the settings pane for your app:

enter image description here