ruby-on-rails - 在 Engine Yard 上设置环境变量

标签 ruby-on-rails deployment production engineyard

我的应用程序在 Engine Yard 服务上,我需要设置环境变量以使用我的 secret ID 和密码。

有人知道我如何设置每个变量吗?做这个的最好方式是什么?

最佳答案

我刚刚为在 Unicorn 上运行的应用程序设置了环境变量。

  • 打开/data/{app_name}/shared/config/env.custom 并将其编辑为如下所示:
    export SECRET_ID=yourid
    export SECRET_PASSWORD=yourpass
    
  • 重启 unicorn /engineyard/bin/app_{app_name} reload

  • 如果您使用的是乘客,请查看:
    https://stackoverflow.com/a/12955526/1520775
    https://github.com/jimneath/ey-cloud-recipes/tree/master/cookbooks/passenger_env_vars

    关于ruby-on-rails - 在 Engine Yard 上设置环境变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12824509/

    相关文章:

    ruby-on-rails - 什么是适合 Rails 的购物车 gem?

    ruby-on-rails - 使用 ActiveRecord 时 Rails 日志的格式

    windows - 部署 QML 应用程序

    node.js - 如何在 hapijs 中的生产服务器中禁用 swagger API 文档

    debugging - Flutter 在编译发布时是否删除 Debug模式代码?

    java - 随机生成的 UUID 有重复项

    ruby-on-rails - RubyMine 错误 : Unable to find associated Rails Model for ':users' associations failed

    javascript - 如何在我的 create.js.erb 中重置/清除表单?

    deployment - JRE 安装如何工作?

    c# - 无需签名即可部署 ClickOnce 应用程序