Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Configatron::UndefinedKeyError - Key not found: oauth (for locked configatron) #19

Open
dmerrick opened this issue Oct 28, 2015 · 1 comment

Comments

@dmerrick
Copy link

Not sure if this belongs here or in chalk-config.

I'm running this locally without Docker or Heroku or the dev script. Just regular ol' bundle exec bin/gaps_server.rb behind Unicorn and nginx. Unfortunately I get the following error:

2015-10-28 22:02:20 - Configatron::UndefinedKeyError - Key not found: oauth (for locked configatron):
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/configatron-4.5.0/lib/configatron/store.rb:44:in `block in []'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/configatron-4.5.0/lib/configatron/store.rb:73:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/configatron-4.5.0/lib/configatron/store.rb:73:in `fetch'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/configatron-4.5.0/lib/configatron/store.rb:42:in `[]'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/configatron-4.5.0/lib/configatron/store.rb:164:in `do_lookup'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/configatron-4.5.0/lib/configatron/store.rb:126:in `method_missing'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/configatron-4.5.0/lib/configatron/root_store.rb:54:in `method_missing'
        /srv/www/gaps/releases/20151028213059/lib/gaps/requestor.rb:18:in `base_client'
        /srv/www/gaps/releases/20151028213059/bin/gaps_server.rb:45:in `block in <class:GapsServer>'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1610:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1610:in `block in compile!'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1014:in `[]'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1014:in `block in process_route'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1012:in `catch'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1012:in `process_route'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:965:in `block in filter!'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:965:in `each'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:965:in `filter!'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1083:in `block in dispatch!'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `block in invoke'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `catch'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `invoke'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1081:in `dispatch!'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:906:in `block in call!'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `block in invoke'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `catch'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `invoke'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:906:in `call!'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:894:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/rack-1.6.4/lib/rack/commonlogger.rb:33:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:218:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:211:in `call'
        /srv/www/gaps/releases/20151028213059/lib/gaps/third/healthcheck.rb:15:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/rack-1.6.4/lib/rack/nulllogger.rb:9:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:181:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:2021:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1486:in `block in call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1795:in `synchronize'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1486:in `call'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:580:in `process_client'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:674:in `worker_loop'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:529:in `spawn_missing_workers'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:140:in `start'
        /home/deploy/.bundler/gaps/ruby/2.1.0/gems/unicorn-4.9.0/bin/unicorn_rails:209:in `<top (required)>'
        /home/deploy/.bundler/gaps/ruby/2.1.0/bin/unicorn_rails:23:in `load'
        /home/deploy/.bundler/gaps/ruby/2.1.0/bin/unicorn_rails:23:in `<main>'

It seems to be loading site.yaml correctly (otherwise it would error telling me to create the file), and the file itself seems to be valid.

I tried hardcoding the full path to site.yml in the source code, but I still get the same error.

@dmerrick
Copy link
Author

dmerrick commented Nov 9, 2015

Welp, not much help on this one.

The answer seems to be that Puma is hardcoded into Gaps, so it's not worth trying to get it to run behind Unicorn. I switched to Puma, but it meant I had to do a lot of extra infrastructure work.

IMHO, this project should really be webserver-agnostic.

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

No branches or pull requests

1 participant