生产环境变量 [英] Environment variables on production
问题描述
我在开发和测试中使用了dotenv gem它在尝试访问我的环境变量时工作正常,但在生产中似乎不起作用。我看到,dotenv宝石并不意味着在生产中工作。我必须设置几乎20个不同的环境变量,包括API密钥等,我正在使用橡胶/ capistrano进行部署。
我如何以干净的方式使其工作?
您可以使用 I’m currently deploying my Rails application on Amazon and I’m facing a problem with environment variables. I'm using the dotenv gem on development and testing and it works just fine while trying to access my environment variables, but in production it does not seem to work. I read that the dotenv gem isn't meant to work on production. I have to set almost 20 different environment variables including API keys, etc., I'm deploying with rubber/capistrano. How can I get this working in a clean way? You could use the figaro gem. I am using this and it works fine in production. 这篇关于生产环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!