1

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 lib/figaro/rails/application.rb suggests that the path in a rails environment is hardcoded to

::Rails.root.join("config", "application.yml")

Is it like this or am I missing something?

Tom
  • 3,807
  • 4
  • 33
  • 58
  • 1
    What is the issue could you say? because I find `config/application.yml` is the standard place to keep that file. – Arup Rakshit Jul 19 '16 at 10:39

1 Answers1

1

I created a figaro.rb file in the config/initializers folder. Then used the code below.

Figaro.application.path = (Rails.root.join('config', 'figaro_env.yml'))

Figaro.load

This allows you to put all your figaro enviroment variables in config/figaro_env.yml. This technically loads figaro twice, but it works.