Figaro Gem's official documentation clearly says (see "Give me an example" section) the following:
NOTE: Figaro uses Rails' standard hooks to initialize. Unfortunately, this hook apparently occurs after database.yml is read.
Because of this issue, environment variables created in
application.yml don't work inside database.yml.
Upon investigating further I found out few issues were raised regarding this. Steve Richert (creator of Figaro Gem with "laserlemon" Github id) says this on the issue #70
This is a known issue. We use Rails' standard hooks to initialize
Figaro before Rails initializes. Unfortunately, this hook apparently
occurs after database.yml is read. Trying to circumvent the standard
hooks and tie into Rails' initialization elsewhere introduces a host
of new problems and makes it very difficult to account for every
situation in which the Rails environment is loaded. I'm afraid this
falls into the "won't fix" bucket until Rails provides a better (and
supported) hook that Figaro can tie into...
UPDATE:
As per the pull request #100 the database.yml config is working with fine latest version of both Rails (like 4.0 and 4.1) and Figaro.
Finally, I highly recommend reading Rails Environment Variables guide by Taylor Mock and Daniel Kehoe. This is a MUST read for all RoR developers.