本文介绍了你如何用Ruby on Rails 4.1.0beta1管理密钥和heroku?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

随着secrets.yml文件的发布,我删除了对Figaro的依赖,并将所有密钥移至secrets.yml并将该文件添加到.gitignore。





使用Figaro,我将运行rake任务以将密钥部署到heroku作为env变量并在.gitignore中保留application.yml。显然,我不能再这样做了。那么我该如何处理这个问题? 解决方案

的heroku设置



如果你想像这样在本地使用



KEY = xyz OTHER_KEY = 123 rails s


With the release of the secrets.yml file, I removed my reliance on Figaro and moved all of my keys to secrets.yml and added that file to .gitignore.

But when I tried to push to Heroku, Heroku said they needed that file in my repo in order to deploy the website. which makes sense, but I don't want my keys in git if I can avoid it.

With Figaro, I would run a rake task to deploy the keys to heroku as env variables and keep application.yml in the .gitignore. Obviously, I can't do that any more. So how do I handle this?

解决方案

see this link for heroku settings

if u want to run on local use like this

KEY=xyz OTHER_KEY=123 rails s

这篇关于你如何用Ruby on Rails 4.1.0beta1管理密钥和heroku?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 06:14