I'm using two API : Cloudinary and Google Maps Geocoding API, both works on development with no problems. But on prod, Google Maps doesn't work because "Google Maps API warning: NoApiKeys".
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 :
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 :
#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"
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 :
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.