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

dry-monitor SQL Logger - Invalid constructor params #54

Closed
piktur opened this issue Aug 23, 2017 · 3 comments
Closed

dry-monitor SQL Logger - Invalid constructor params #54

piktur opened this issue Aug 23, 2017 · 3 comments

Comments

@piktur
Copy link
Contributor

piktur commented Aug 23, 2017

Reporting issue with default SQL logger configuration.

Steps to reproduce

$ dry-web-roda new app
$ bundle exec shotgun -p 3001 -o 0.0.0.0 config.ru
$ open http://localhost:3001

Visiting localhost:3001 renders Boot Error

Boot Error

Something went wrong while loading config.ru

ArgumentError: invalid theme: Rouge::Themes::Gruvbox

rouge-2.2.1/lib/rouge/formatters/terminal256.rb:20:in `initialize'
dry-monitor-0.0.2/lib/dry/monitor/sql/logger.rb:23:in `new'
dry-monitor-0.0.2/lib/dry/monitor/sql/logger.rb:23:in `initialize'
app/system/boot/monitor.rb:7:in `new'
app/system/boot/monitor.rb:7:in `block (2 levels) in <top (required)>'
dry-system-0.7.3/lib/dry/system/lifecycle.rb:88:in `trigger!'
dry-system-0.7.3/lib/dry/system/lifecycle.rb:63:in `start'
dry-system-0.7.3/lib/dry/system/lifecycle.rb:50:in `block in call'
dry-system-0.7.3/lib/dry/system/lifecycle.rb:48:in `each'
dry-system-0.7.3/lib/dry/system/lifecycle.rb:48:in `call'
dry-system-0.7.3/lib/dry/system/booter.rb:59:in `block in start'
dry-system-0.7.3/lib/dry/system/booter.rb:47:in `block in init'
dry-system-0.7.3/lib/dry/system/booter.rb:72:in `call'
dry-system-0.7.3/lib/dry/system/booter.rb:45:in `init'
dry-system-0.7.3/lib/dry/system/booter.rb:59:in `start'
dry-system-0.7.3/lib/dry/system/booter.rb:36:in `block in finalize!'
dry-system-0.7.3/lib/dry/system/booter.rb:35:in `each'
dry-system-0.7.3/lib/dry/system/booter.rb:35:in `finalize!'
dry-system-0.7.3/lib/dry/system/container.rb:261:in `finalize!'
app/system/boot.rb:8:in `<top (required)>'
config.ru:1:in `require_relative'
config.ru:1:in `block in inner_app'
rack-2.0.3/lib/rack/builder.rb:55:in `instance_eval'
rack-2.0.3/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `inner_app'
shotgun-0.9.2/lib/shotgun/loader.rb:113:in `eval'
shotgun-0.9.2/lib/shotgun/loader.rb:113:in `inner_app'
shotgun-0.9.2/lib/shotgun/loader.rb:103:in `assemble_app'
shotgun-0.9.2/lib/shotgun/loader.rb:86:in `proceed_as_child'
shotgun-0.9.2/lib/shotgun/loader.rb:31:in `call!'
shotgun-0.9.2/lib/shotgun/loader.rb:18:in `call'
shotgun-0.9.2/lib/shotgun/favicon.rb:12:in `call'
rack-2.0.3/lib/rack/urlmap.rb:68:in `block in call'
rack-2.0.3/lib/rack/urlmap.rb:53:in `each'
rack-2.0.3/lib/rack/urlmap.rb:53:in `call'
rack-2.0.3/lib/rack/builder.rb:153:in `call'
puma-3.10.0/lib/puma/configuration.rb:225:in `call'
puma-3.10.0/lib/puma/server.rb:605:in `handle_request'
puma-3.10.0/lib/puma/server.rb:437:in `process_client'
puma-3.10.0/lib/puma/server.rb:301:in `block in run'
puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'

As of Rouge #b9f7262 Rouge::Formatters::Terminal256#initialize expects theme param to be an instance of Rouge::Theme. Instead it receives ::config.theme, a Class, from Dry::Monitor::SQL::Logger#initialize.

Suggesting gem restraint gem 'rouge', '2.2.0' or adjustments to constructor.

@v-kolesnikov
Copy link
Contributor

Use rogue 2.1.1.
This is compatibility broken change in rogue: rouge-ruby/rouge@b9f7262

@solnic
Copy link
Member

solnic commented Aug 23, 2017

Thanks for reporting this. I'll just pin the version for now.

@piktur
Copy link
Contributor Author

piktur commented Aug 23, 2017

Cheers

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

3 participants