Next-gen ruby libs! » github.com/dry-rb » website: https://dry-rb.org » forum: https://discourse.dry-rb.org
Problem with a just-generated Dry::Web::Roda app and DB-related Rake tasks (only ones I've tried so far).
First, I've gone through the instructions in the README, and get the "Welcome" screen up with no warnings/errors in Puma. Running rake -T
gives me a list of 10 db-related tasks, as well as spec
. OK so far.
But, running rake db:create
gives me a KeyError and a stack trace:
rake aborted!
KeyError: key not found: :block
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/components/bootable.rb:311:in `fetch'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/components/bootable.rb:311:in `block'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/components/bootable.rb:273:in `lifecycle'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/components/bootable.rb:84:in `init'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/booter.rb:63:in `block (2 levels) in init'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/booter.rb:93:in `block in call'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/booter.rb:117:in `with_component'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/booter.rb:88:in `call'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/booter.rb:62:in `block in init'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/booter.rb:117:in `with_component'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/booter.rb:61:in `init'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/booter.rb:76:in `block in start'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/booter.rb:117:in `with_component'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/booter.rb:73:in `start'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/container.rb:554:in `block in load_component'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/container.rb:547:in `tap'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/container.rb:547:in `load_component'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-system-0.8.1/lib/dry/system/container.rb:480:in `resolve'
/Users/jeffdickey/src/rails/meldd/fort-roda/tmp/gemset/gems/dry-container-0.6.0/lib/dry/container/mixin.rb:125:in `[]'
/Users/jeffdickey/src/rails/meldd/fort-roda/Rakefile:19:in `settings'
/Users/jeffdickey/src/rails/meldd/fort-roda/Rakefile:24:in `database_uri'
/Users/jeffdickey/src/rails/meldd/fort-roda/Rakefile:60:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:create
(See full trace by running task with --trace)
On the one hand, I feel like I'm missing something blindingly obvious; on the other, an error reported from within Dry::Components on a virgin app gives me pause.
Any pointers?
dry-system
is 0.8.1; will try an 0.7.x and see what happens. The ~/src/rails/meldd
is a historical quirk; meldd
references the org I'm with now, and we originally started out as a Rails shop, hence obsolete directory -naming conventions. Thanks for the dry-system
tip :D
boot
methods instead of init
persistence
since that's the top level key