导轨| figaro heroku:设置“找不到命令”

时间:2018-01-08 12:40:01

标签: ruby-on-rails google-maps heroku rails-geocoder figaro-ruby

我正在使用两个API:Cloudinary和Google Maps Geocoding API,它们都可以在开发过程中正常运行。 但是在产品上,谷歌地图不起作用,因为“Google Maps API警告:NoApiKeys”。

heroku config:set GOOGLE_API_SERVER_KEY=AIza*****************************4

工作正常,我在heroku的仪表板上找到了我的两个API,但是:

figaro heroku:set -e production
Could not find command "heroku:set"

同样:

figaro heroku:set
Could not find command "heroku:set"

我想我的问题在于宝石骗子。 我的gemfile:

#figaro
gem 'figaro', '~> 1.1', '>= 1.1.1'

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"

当我输入:

bundle exec figaro heroku:set

我的每一件事都很好(我猜):

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

我是开发世界的新手,很抱歉,如果答案很简单:) 谢谢你的时间!

修改 : 我尝试了几个版本的figaro:

gem 'figaro', '~> 1.1', '>= 1.1.1'
gem 'figaro', github: 'sealocal/figaro'
gem 'figaro', '>= 1.0.0.rc1'
gem 'figaro'

然后:

bundle install
bundle binstubs figaro
figaro install
spring stop

但我跑的时候还是:

figaro heroku:set -e production

figaro heroku:set

我有:

Could not find command "heroku:set".

版本:

ruby '2.3.5'
gem 'rails', '~> 5.1.4'

1 个答案:

答案 0 :(得分:0)

好的,我发现,这是我的钥匙问题。我在谷歌游戏机中生成了另一个,现在没关系。