Questions tagged [figaro-ruby]

Figaro is a Rails app configuration library.

Figaro is a configuration library that exposes configuration data, stored in application.yml file or in environmental variables pre-loaded in Ruby's ENV object, to the Rails app. It is inspired by the Twelve-factor app methodology.

Questions should mostly be about the library itself or its integrations in apps.

External resources:

Related tags: ,

53 questions
6
votes
1 answer

Is there a way to use figaro with foreman?

I prefer not to use dotenv, but really would like to use the foreman gem. Will it work with figaro? Currently I use my own yaml files for loading env variables, and I store them in the root of my project under a .env directory. It seems that foreman…
Nathan
  • 7,627
  • 11
  • 46
  • 80
5
votes
1 answer

Missing application.yml file - Atom hiding vcs ignored files

I am using Figaro to set up ENV variables. Ever since installing it, my application.yml has disappeared. When I do a search for the file in my editor, all that comes up is the reference to the file in my secrets.yml file to ignore application.yml.…
5
votes
2 answers

Using Figaro and Secrets.yml to Manage Env Variables

I have a rails 4.1 app and I'm trying to organize my env variables. As of right now I have a secrets.yml file in my config/ folder. I also installed the figaro gem. My goal was to have all my env variables in the application.yml (not checked into…
3
votes
1 answer

How to pass array environment variables to heroku using figaro gem

My application.yml file is as follows: KEYS: ["xxxxxx", "yyyyyy", "zzzzzz"] When I run figaro heroku:set I receive this error: .rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/figaro-1.1.1/lib/figaro/cli/heroku_set.rb:7:in `system': no implicit…
wuliwong
  • 4,238
  • 9
  • 41
  • 69
3
votes
1 answer

Copy Figaro's application.yml with Capistrano Deploy - Rails

I am trying to deploy my Rails application to a staging server with Capistrano, nginx and Puma. I am using the Figaro gem to setting ENV variables. When deploying, the standard Capistrano configuration does not look for and copy the application.yml…
simonlehmann
  • 852
  • 1
  • 10
  • 27
2
votes
1 answer

figaro is not picking env var inside rails controller

I am using figaro gem in Rails 5.1. I have a custom bash script too that sets the ENV vars so that we do not have to set them in application.yml and still utilize Figaro.env.{var_name} to access those env var values. Today I noticed that in…
Mohsin Sethi
  • 803
  • 4
  • 16
2
votes
1 answer

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. But on prod, Google Maps doesn't work because "Google Maps API warning: NoApiKeys". heroku config:set…
2
votes
4 answers

MySQL No database selected rails

I got something like this when i hit rake db:migrate Im using figaro in my app, its my first time with this gem any mysql so I cant get what excatly is wrong. Thanks in advance :) Mysql2::Error: No database selected: CREATE TABLE schema_migrations…
Daniel
  • 153
  • 2
  • 12
2
votes
6 answers

How to pass an ENV variable into script tag

I'm trying to pass my api key which is in my application.yml file into a js script tag for google maps, is this possible? If not, what is the best way to handle this? Also, I'm using the Figaro gem to store ENV variables. Thanks in advance. <%…
halfacreyum
  • 297
  • 5
  • 16
2
votes
1 answer

Uncaught Error: You did not set a valid publishable key. Rails 4.2.4

I've went back to a 'was-all-perfect' project I did last year January. Now..I've upgraded to rails 4.2.4 and upgraded my Figaro to 1.1.1. All seems well but I got this stripe error. I really dont see an issue. But I've noticed that my head do not…
Sylar
  • 11,422
  • 25
  • 93
  • 166
2
votes
0 answers

Stripe Plan ID not saving to user

I'm building a rails app that involves signing up customers to different plans. I'm using Rails and the gems Devise and Stripe, and Figaro. I have three plans, plan_id 1 is going to be admin and is free. plan_id 2 is basic, and free, and will allow…
1
vote
1 answer

My aws key pair is on github after several cmmits

I have sensitive key information probably on several branches in multiple commits. I am stupid. When I was first learning about aws and setting it up with fog and carrierwave it hadn't even occured to me that my secret keys were being published to…
dmberko11
  • 427
  • 7
  • 17
1
vote
1 answer

Facebook messenger webhook not accepting my callback url

I'm creating a chatbot with the Facebook Messenger developer platform. My problem comes as I'm trying to set up the Webhook using a ngrok tunnel as callback_url and using the figaro gem to add my access_token and verify_token to my app. Somehow,…
1
vote
1 answer

Rails: Use environment variables defined with Figaro in Docker

If I'm not wrong, it seems like defined with Figaro variables are not available in Docker container. I have env files to configure Postgresq DB: POSTGRES_USER=ENV['db_user'] POSTGRES_PASSWORD=ENV['db_password] POSTGRES_DB=ENV['db_name'] I have…
belgoros
  • 3,590
  • 7
  • 38
  • 76
1
vote
1 answer

Rails Figaro different location for application.yml

I was wondering if it is possible to have the application.yml in a different location. I skipped through the source and found that if you use it over cli, you can actually specify '-p' to run against an arbitrary application.yml. The…
Tom
  • 3,807
  • 4
  • 33
  • 58
1
2 3 4