veracross / consult

Configuration and secrets management for Rails
MIT License
12 stars 0 forks source link

Unhandled exception when starting rails app, after adding this gem #1

Closed aharpervc closed 6 years ago

aharpervc commented 6 years ago

I generated a new rails app, added gem 'consult', '~> 0.5.0' to the Gemfile, ran bundle, then bundle exec rails s. This is what happened:

$ bundle exec rails s
c:/bin/ruby/243/lib/ruby/gems/2.4.0/gems/consult-0.5.0/lib/consult.rb:70:in `active_templates': private method `select' called for nil:NilClass (NoMethodError)
        from c:/bin/ruby/243/lib/ruby/gems/2.4.0/gems/consult-0.5.0/lib/consult.rb:75:in `render!'
        from c:/bin/ruby/243/lib/ruby/gems/2.4.0/gems/consult-0.5.0/lib/consult/rails/engine.rb:10:in `block in <class:Railtie>'
        from c:/bin/ruby/243/lib/ruby/gems/2.4.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
(...snip...)

I had not yet added a configuration yaml, so I didn't expect anything to get templated, but I didn't think that it'd stop me from running the app.

sixfeetover commented 6 years ago

Thanks. We need to catch this and just show a message. Also tdb is a generator to install the config.