2

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'
Pesko
  • 61
  • 1
  • 8
  • which version are you using for ruby, rails and figaro ? – sam Jan 08 '18 at 12:54
  • Gemfile : ruby '2.3.5' gem 'figaro', '~> 1.1', '>= 1.1.1' gem 'rails', '~> 5.1.4' – Pesko Jan 08 '18 at 12:59
  • Can you try this once gem 'figaro', github: 'sealocal/figaro' ? – sam Jan 08 '18 at 13:01
  • @sam I tried, but it's still doesn't work – Pesko Jan 08 '18 at 13:03
  • figaro heroku:set -e production try this – sam Jan 08 '18 at 13:05
  • Yes this is the command I tried and unfortunately, this command doesn't work – Pesko Jan 08 '18 at 13:07
  • gem 'figaro', '>= 1.0.0.rc1', This is confirmed solution please try it properly. This version has solved that issue. Then try figaro heroku:set -e production. – sam Jan 08 '18 at 13:09
  • it doesn't work. I tried this solution too. Just for to be clear, I replace the gemfile, then 'bundle', then figaro heroku:set -e production' ? I didn't forget anything ? – Pesko Jan 08 '18 at 13:15

1 Answers1

0

Ok, I found, it was a problem with my key. I generated an other one in google console and now it's fine.

Pesko
  • 61
  • 1
  • 8