[英]Rails | figaro heroku:set “Could not find command”
I'm using two API : Cloudinary and Google Maps Geocoding API, both works on development with no problems. 我正在使用两个API:Cloudinary和Google Maps Geocoding API,它们都可以在开发中正常使用。 But on prod, Google Maps doesn't work because "Google Maps API warning: NoApiKeys". 但是在产品上,由于“ Google Maps API警告:NoApiKeys”,Google Maps无法使用。
heroku config:set GOOGLE_API_SERVER_KEY=AIza*****************************4
Works fine, I find both of my API's keys on my heroku's dashboard, but : 工作正常,我在heroku的仪表板上找到了我的两个API密钥,但是:
figaro heroku:set -e production
Could not find command "heroku:set"
Same with : 与:相同
figaro heroku:set
Could not find command "heroku:set"
I suppose my problem is with the gem figaro. 我想我的问题是费加罗宝石。 My gemfile : 我的gemfile:
#figaro
gem 'figaro', '~> 1.1', '>= 1.1.1'
Application.yml Application.yml
# Add configuration values here, as shown below.
#
# pusher_app_id: "2954"
# pusher_key: 7381a978f7dd7f9a1117
# pusher_secret: abdc3b896a0ffb85d373
# stripe_api_key: sk_test_2J0l093xOyW72XUYJHE4Dv2r
# stripe_publishable_key: pk_test_ro9jV5SNwGb1yYlQfzG17LHK
#
# production:
# stripe_api_key: sk_live_EeHnL644i6zo4Iyq4v1KdV9H
# stripe_publishable_key: pk_live_9lcthxpSIHbGwmdO941O1XVU
CLOUDINARY_URL: "cloudinary://6714********************************t"
GOOGLE_API_SERVER_KEY: "AIz***********************************4"
When I type : 当我输入时:
bundle exec figaro heroku:set
I have everythings good (I guess): 我一切都很好(我想):
Setting CLOUDINARY_URL, GOOGLE_API_SERVER_KEY and restarting ⬢ coin-de-paris... done, v27
CLOUDINARY_URL: cloudinary://671**********************st
GOOGLE_API_SERVER_KEY: AI**********************4
I'm new in the dev world, so sorry if the answer is easy :) Thanks for your time ! 我是开发人员世界中的新手,很抱歉,如果答案很简单:)谢谢您的宝贵时间!
EDIT : I tried few versions of figaro like : 编辑 :我尝试了几个版本的Figaro:
gem 'figaro', '~> 1.1', '>= 1.1.1'
gem 'figaro', github: 'sealocal/figaro'
gem 'figaro', '>= 1.0.0.rc1'
gem 'figaro'
Then : 然后 :
bundle install
bundle binstubs figaro
figaro install
spring stop
but still when I run : 但是当我跑步时:
figaro heroku:set -e production
and 和
figaro heroku:set
I have : 我有 :
Could not find command "heroku:set".
Versions: 版本:
ruby '2.3.5'
gem 'rails', '~> 5.1.4'
Ok, I found, it was a problem with my key. 好的,我发现这是我的钥匙有问题。 I generated an other one in google console and now it's fine. 我在Google控制台中生成了另一个,现在一切正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.