I can't figure out why my Figaro keys are not recognized in a Sinatra app:
#main.rb
require 'sinatra'
require 'sinatra/reloader' if development?
require 'figaro'
get '/:logger' do
logger = params[:logger]
message = Figaro.env.message?
"Using logger: #{logger} said #{message}"
end
Here the application.yml:
jar: org.apache.log4J
pattern: ddMMyyyy
level: INFO
message: Hey LOG4J
I can't figure out why my Figaro keys are not recognized in a Sinatra app:
Here the application.yml:
When I run
ruby main.rb
and access to http://localhost:4567/log4j, I always get:my config.ru file:
Any idea on what is wrong here ? Thank you.