Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sinatra - return no values from application.yml #221

Open
belgoros opened this issue Nov 10, 2015 · 2 comments
Open

Sinatra - return no values from application.yml #221

belgoros opened this issue Nov 10, 2015 · 2 comments

Comments

@belgoros
Copy link

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

When I run ruby main.rband access to http://localhost:4567/log4j, I always get:

Using logger: log4j said false

my config.ru file:

require 'sinatra'
require 'figaro'
require './main'

run Sinatra::Application

Any idea on what is wrong here ? Thank you.

@bpaquet
Copy link

bpaquet commented Jan 26, 2016

Please see #229

@belgoros
Copy link
Author

@bpaquet: thank you for sharing, I'll take a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants