joshmn / caffeinate-webui

9 stars 2 forks source link

Rails 5.2 / Ruby 2.7.8 Issue #3

Open chrisedington opened 1 month ago

chrisedington commented 1 month ago

Hi @joshmn

Thank you for this gem!

I'm having the below issue, any ideas? :)

Completed 500 Internal Server Error in 2402ms (ActiveRecord: 2110.7ms)

ActionView::Template::Error (undefined method `join' for nil:NilClass):
    58:   </div>
    59:
    60:   <div class="d-flex justify-content-end">
    61:     <%= will_paginate @upcoming_mailings %>
    62:   </div>
    63: </div>

will_paginate-bootstrap-style (0.2.4) config/initializers/will_paginate.rb:31:in `to_html'
will_paginate (3.3.1) lib/will_paginate/view_helpers.rb:94:in `will_paginate'
vendor/gems/rrt-1.2.4/lib/rrt/extensions/will_paginate.rb:7:in `will_paginate'
caffeinate_webui (0.1.0) app/views/caffeinate/webui/dashboard/show.html.erb:61:in `___sers_chris__rvm_gems_ruby_______gems_caffeinate_webui_______app_views_caffeinate_webui_dashboard_show_html_erb___4423257362628628505_448200'
actionview (5.2.8.1) lib/action_view/template.rb:159:in `block in render'
activesupport (5.2.8.1) lib/active_support/notifications.rb:168:in `block in instrument'
activesupport (5.2.8.1) lib/active_support/notifications/instrumenter.rb:23:in `instrument'
sentry-rails (5.9.0) lib/sentry/rails/tracing.rb:54:in `instrument'
activesupport (5.2.8.1) lib/active_support/notifications.rb:168:in `instrument'
actionview (5.2.8.1) lib/action_view/template.rb:354:in `instrument_render_template'
actionview (5.2.8.1) lib/action_view/template.rb:157:in `render'
actionview (5.2.8.1) lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
actionview (5.2.8.1) lib/action_view/renderer/abstract_renderer.rb:44:in `block in instrument'
activesupport (5.2.8.1) lib/active_support/notifications.rb:168:in `block in instrument'
activesupport (5.2.8.1) lib/active_support/notifications/instrumenter.rb:23:in `instrument'
sentry-rails (5.9.0) lib/sentry/rails/tracing.rb:54:in `instrument'
activesupport (5.2.8.1) lib/active_support/notifications.rb:168:in `instrument'
actionview (5.2.8.1) lib/action_view/renderer/abstract_renderer.rb:43:in `instrument'
actionview (5.2.8.1) lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'
actionview (5.2.8.1) lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
actionview (5.2.8.1) lib/action_view/renderer/template_renderer.rb:52:in `render_template'
actionview (5.2.8.1) lib/action_view/renderer/template_renderer.rb:16:in `render'
actionview (5.2.8.1) lib/action_view/renderer/renderer.rb:44:in `render_template'
actionview (5.2.8.1) lib/action_view/renderer/renderer.rb:25:in `render'
actionview (5.2.8.1) lib/action_view/rendering.rb:103:in `_render_template'
actionpack (5.2.8.1) lib/action_controller/metal/streaming.rb:219:in `_render_template'
actionview (5.2.8.1) lib/action_view/rendering.rb:84:in `render_to_body'
actionpack (5.2.8.1) lib/action_controller/metal/rendering.rb:52:in `render_to_body'
actionpack (5.2.8.1) lib/action_controller/metal/renderers.rb:142:in `render_to_body'
actionpack (5.2.8.1) lib/abstract_controller/rendering.rb:25:in `render'
actionpack (5.2.8.1) lib/action_controller/metal/rendering.rb:36:in `render'
actionpack (5.2.8.1) lib/action_controller/metal/instrumentation.rb:46:in `block (2 levels) in render'
activesupport (5.2.8.1) lib/active_support/core_ext/benchmark.rb:14:in `block in ms'
/Users/chris/.rvm/rubies/ruby-2.7.8/lib/ruby/2.7.0/benchmark.rb:308:in `realtime'
activesupport (5.2.8.1) lib/active_support/core_ext/benchmark.rb:14:in `ms'
actionpack (5.2.8.1) lib/action_controller/metal/instrumentation.rb:46:in `block in render'
actionpack (5.2.8.1) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
searchkick (4.6.1) lib/searchkick/logging.rb:217:in `cleanup_view_runtime'
activerecord (5.2.8.1) lib/active_record/railties/controller_runtime.rb:31:in `cleanup_view_runtime'
actionpack (5.2.8.1) lib/action_controller/metal/instrumentation.rb:45:in `render'
meta-tags (2.19.0) lib/meta_tags/controller_helper.rb:22:in `render'
wicked_pdf (2.8.1) lib/wicked_pdf/pdf_helper.rb:18:in `render'
actionpack (5.2.8.1) lib/action_controller/metal/implicit_render.rb:35:in `default_render'
actionpack (5.2.8.1) lib/action_controller/metal/basic_implicit_render.rb:6:in `block in send_action'
actionpack (5.2.8.1) lib/action_controller/metal/basic_implicit_render.rb:6:in `tap'
actionpack (5.2.8.1) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (5.2.8.1) lib/abstract_controller/base.rb:194:in `process_action'
actionpack (5.2.8.1) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (5.2.8.1) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
activesupport (5.2.8.1) lib/active_support/callbacks.rb:109:in `block in run_callbacks'
marginalia (1.11.1) lib/marginalia.rb:109:in `record_query_comment'
activesupport (5.2.8.1) lib/active_support/callbacks.rb:118:in `block in run_callbacks'
ahoy_matey (3.3.0) lib/ahoy/controller.rb:45:in `set_ahoy_request_store'
activesupport (5.2.8.1) lib/active_support/callbacks.rb:118:in `block in run_callbacks'
sentry-rails (5.9.0) lib/sentry/rails/controller_transaction.rb:17:in `block in sentry_around_action'
sentry-ruby (5.9.0) lib/sentry/hub.rb:109:in `block in with_child_span'
sentry-ruby (5.9.0) lib/sentry/span.rb:169:in `with_child_span'
sentry-ruby (5.9.0) lib/sentry/hub.rb:107:in `with_child_span'
sentry-ruby (5.9.0) lib/sentry-ruby.rb:456:in `with_child_span'
sentry-rails (5.9.0) lib/sentry/rails/controller_transaction.rb:14:in `sentry_around_action'
activesupport (5.2.8.1) lib/active_support/callbacks.rb:118:in `block in run_callbacks'
activesupport (5.2.8.1) lib/active_support/callbacks.rb:136:in `run_callbacks'
actionpack (5.2.8.1) lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack (5.2.8.1) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (5.2.8.1) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
activesupport (5.2.8.1) lib/active_support/notifications.rb:168:in `block in instrument'
activesupport (5.2.8.1) lib/active_support/notifications/instrumenter.rb:23:in `instrument'
sentry-rails (5.9.0) lib/sentry/rails/tracing.rb:54:in `instrument'
activesupport (5.2.8.1) lib/active_support/notifications.rb:168:in `instrument'
actionpack (5.2.8.1) lib/action_controller/metal/instrumentation.rb:32:in `process_action'
actionpack (5.2.8.1) lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
searchkick (4.6.1) lib/searchkick/logging.rb:212:in `process_action'
activerecord (5.2.8.1) lib/active_record/railties/controller_runtime.rb:24:in `process_action'
actionpack (5.2.8.1) lib/abstract_controller/base.rb:134:in `process'
actionview (5.2.8.1) lib/action_view/rendering.rb:32:in `process'
actionpack (5.2.8.1) lib/action_controller/metal.rb:191:in `dispatch'
actionpack (5.2.8.1) lib/action_controller/metal.rb:252:in `dispatch'
actionpack (5.2.8.1) lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
actionpack (5.2.8.1) lib/action_dispatch/routing/route_set.rb:34:in `serve'
actionpack (5.2.8.1) lib/action_dispatch/journey/router.rb:52:in `block in serve'
actionpack (5.2.8.1) lib/action_dispatch/journey/router.rb:35:in `each'
actionpack (5.2.8.1) lib/action_dispatch/journey/router.rb:35:in `serve'
actionpack (5.2.8.1) lib/action_dispatch/routing/route_set.rb:840:in `call'
railties (5.2.8.1) lib/rails/engine.rb:524:in `call'
railties (5.2.8.1) lib/rails/railtie.rb:190:in `public_send'
railties (5.2.8.1) lib/rails/railtie.rb:190:in `method_missing'
actionpack (5.2.8.1) lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
actionpack (5.2.8.1) lib/action_dispatch/routing/mapper.rb:48:in `serve'
actionpack (5.2.8.1) lib/action_dispatch/journey/router.rb:52:in `block in serve'
actionpack (5.2.8.1) lib/action_dispatch/journey/router.rb:35:in `each'
actionpack (5.2.8.1) lib/action_dispatch/journey/router.rb:35:in `serve'
actionpack (5.2.8.1) lib/action_dispatch/routing/route_set.rb:840:in `call'
omniauth (2.1.2) lib/omniauth/strategy.rb:202:in `call!'
omniauth (2.1.2) lib/omniauth/strategy.rb:169:in `call'
omniauth (2.1.2) lib/omniauth/strategy.rb:202:in `call!'
omniauth (2.1.2) lib/omniauth/strategy.rb:169:in `call'
bullet (7.0.7) lib/bullet/rack.rb:14:in `call'
warden (1.2.9) lib/warden/manager.rb:36:in `block in call'
warden (1.2.9) lib/warden/manager.rb:34:in `catch'
warden (1.2.9) lib/warden/manager.rb:34:in `call'
rack (2.2.9) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.9) lib/rack/etag.rb:27:in `call'
rack (2.2.9) lib/rack/conditional_get.rb:27:in `call'
rack (2.2.9) lib/rack/head.rb:12:in `call'
actionpack (5.2.8.1) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
rack (2.2.9) lib/rack/session/abstract/id.rb:266:in `context'
rack (2.2.9) lib/rack/session/abstract/id.rb:260:in `call'
actionpack (5.2.8.1) lib/action_dispatch/middleware/cookies.rb:670:in `call'
actionpack (5.2.8.1) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (5.2.8.1) lib/active_support/callbacks.rb:98:in `run_callbacks'
actionpack (5.2.8.1) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (5.2.8.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
sentry-rails (5.9.0) lib/sentry/rails/rescued_exception_interceptor.rb:12:in `call'
actionpack (5.2.8.1) lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
web-console (3.7.0) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.7.0) lib/web_console/middleware.rb:30:in `block in call'
web-console (3.7.0) lib/web_console/middleware.rb:20:in `catch'
web-console (3.7.0) lib/web_console/middleware.rb:20:in `call'
sentry-ruby (5.9.0) lib/sentry/rack/capture_exceptions.rb:28:in `block (2 levels) in call'
sentry-ruby (5.9.0) lib/sentry/hub.rb:223:in `with_session_tracking'
sentry-ruby (5.9.0) lib/sentry-ruby.rb:385:in `with_session_tracking'
sentry-ruby (5.9.0) lib/sentry/rack/capture_exceptions.rb:19:in `block in call'
sentry-ruby (5.9.0) lib/sentry/hub.rb:59:in `with_scope'
sentry-ruby (5.9.0) lib/sentry-ruby.rb:365:in `with_scope'
sentry-ruby (5.9.0) lib/sentry/rack/capture_exceptions.rb:18:in `call'
actionpack (5.2.8.1) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (5.2.8.1) lib/rails/rack/logger.rb:38:in `call_app'
railties (5.2.8.1) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (5.2.8.1) lib/active_support/tagged_logging.rb:71:in `block in tagged'
activesupport (5.2.8.1) lib/active_support/tagged_logging.rb:28:in `tagged'
activesupport (5.2.8.1) lib/active_support/tagged_logging.rb:71:in `tagged'
railties (5.2.8.1) lib/rails/rack/logger.rb:26:in `call'
ahoy_matey (3.3.0) lib/ahoy/engine.rb:22:in `call_with_quiet_ahoy'
actionpack (5.2.8.1) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
request_store (1.5.1) lib/request_store/middleware.rb:19:in `call'
actionpack (5.2.8.1) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.2.9) lib/rack/method_override.rb:24:in `call'
rack (2.2.9) lib/rack/runtime.rb:22:in `call'
activesupport (5.2.8.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (5.2.8.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (5.2.8.1) lib/action_dispatch/middleware/static.rb:127:in `call'
rack (2.2.9) lib/rack/sendfile.rb:110:in `call'
actionpack (5.2.8.1) lib/action_dispatch/middleware/ssl.rb:74:in `call'
rack-cors (1.1.1) lib/rack/cors.rb:100:in `call'
railties (5.2.8.1) lib/rails/engine.rb:524:in `call'
puma (6.1.1) lib/puma/configuration.rb:269:in `call'
puma (6.1.1) lib/puma/request.rb:98:in `block in handle_request'
puma (6.1.1) lib/puma/thread_pool.rb:340:in `with_force_shutdown'
puma (6.1.1) lib/puma/request.rb:97:in `handle_request'
puma (6.1.1) lib/puma/server.rb:431:in `process_client'
puma (6.1.1) lib/puma/server.rb:233:in `block in run'
puma (6.1.1) lib/puma/thread_pool.rb:147:in `block in spawn_thread'
/Users/chris/.rvm/gems/ruby-2.7.8/gems/will_paginate-bootstrap-style-0.2.4/config/initializers/will_paginate.rb:31: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
/Users/chris/.rvm/gems/ruby-2.7.8/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
/Users/chris/.rvm/gems/ruby-2.7.8/gems/will_paginate-3.3.1/lib/will_paginate/view_helpers.rb:94: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
/Users/chris/.rvm/gems/ruby-2.7.8/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
/Users/chris/Repositories/shopstar/vendor/gems/rrt-1.2.4/lib/rrt/extensions/will_paginate.rb:7: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
/Users/chris/.rvm/gems/ruby-2.7.8/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
[Transport] Sending envelope with items [event] 2c0d329c8eea4700aa1ba77f8df60dc1 to Sentry
Started GET "/superadmin/admin/caffeinate" for 127.0.0.1 at 2024-10-07 11:55:54 +0100
[Tracing] Discarding <http.server> transaction </superadmin/admin/caffeinate> because it's not included in the random sample (sampling rate = 0.01)
Processing by Caffeinate::Webui::DashboardController#show as HTML
   (191.5ms)  SELECT COUNT(*) FROM `caffeinate_campaign_subscriptions` /*application:SS,controller_with_namespace:Caffeinate::Webui::DashboardController,action:show*/
  ↳ /Users/chris/.rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/log_subscriber.rb:98
   (193.0ms)  SELECT COUNT(*) FROM `caffeinate_mailings` WHERE `caffeinate_mailings`.`skipped_at` IS NULL AND `caffeinate_mailings`.`sent_at` IS NOT NULL /*application:SS,controller_with_namespace:Caffeinate::Webui::DashboardController,action:show*/
  ↳ /Users/chris/.rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/log_subscriber.rb:98
   (190.1ms)  SELECT COUNT(*) FROM `caffeinate_mailings` WHERE `caffeinate_mailings`.`skipped_at` IS NOT NULL /*application:SS,controller_with_namespace:Caffeinate::Webui::DashboardController,action:show*/
  ↳ /Users/chris/.rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/log_subscriber.rb:98
   (184.5ms)  SELECT COUNT(*) FROM `caffeinate_campaigns` WHERE `caffeinate_campaigns`.`active` = TRUE /*application:SS,controller_with_namespace:Caffeinate::Webui::DashboardController,action:show*/
  ↳ /Users/chris/.rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/log_subscriber.rb:98
   (197.6ms)  SELECT COUNT(*) AS count_all, CAST(DATE_FORMAT(CONVERT_TZ(`caffeinate_mailings`.`send_at`, '+00:00', 'Africa/Johannesburg'), '%Y-%m-%d') AS DATE) AS cast_date_format_convert_tz_caffeinate_mailings_send_at_00_00_africa_johannesburg_y_m_d_as_date FROM `caffeinate_mailings` WHERE `caffeinate_mailings`.`skipped_at` IS NULL AND `caffeinate_mailings`.`sent_at` IS NOT NULL AND (`caffeinate_mailings`.`send_at` IS NOT NULL) GROUP BY CAST(DATE_FORMAT(CONVERT_TZ(`caffeinate_mailings`.`send_at`, '+00:00', 'Africa/Johannesburg'), '%Y-%m-%d') AS DATE) /*application:SS,controller_with_namespace:Caffeinate::Webui::DashboardController,action:show*/
  ↳ /Users/chris/.rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/log_subscriber.rb:98
  Rendering /Users/chris/.rvm/gems/ruby-2.7.8/gems/caffeinate_webui-0.1.0/app/views/caffeinate/webui/dashboard/show.html.erb within caffeinate/webui/layouts/application
  Caffeinate::Mailing Load (380.9ms)  SELECT  `caffeinate_mailings`.* FROM `caffeinate_mailings` INNER JOIN `caffeinate_campaign_subscriptions` ON `caffeinate_campaign_subscriptions`.`id` = `caffeinate_mailings`.`caffeinate_campaign_subscription_id` WHERE `caffeinate_mailings`.`skipped_at` IS NULL AND `caffeinate_mailings`.`sent_at` IS NULL AND `caffeinate_campaign_subscriptions`.`unsubscribed_at` IS NULL AND `caffeinate_campaign_subscriptions`.`ended_at` IS NULL ORDER BY `caffeinate_mailings`.`send_at` ASC LIMIT 30 OFFSET 0 /*application:SS,controller_with_namespace:Caffeinate::Webui::DashboardController,action:show*/
  ↳ /Users/chris/.rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/log_subscriber.rb:98
  Caffeinate::CampaignSubscription Load (184.0ms)  SELECT `caffeinate_campaign_subscriptions`.* FROM `caffeinate_campaign_subscriptions` WHERE `caffeinate_campaign_subscriptions`.`id` IN (568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 579, 580, 581, 582) /*application:SS,controller_with_namespace:Caffeinate::Webui::DashboardController,action:show*/
  ↳ /Users/chris/.rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/log_subscriber.rb:98
  Caffeinate::Campaign Load (190.4ms)  SELECT `caffeinate_campaigns`.* FROM `caffeinate_campaigns` WHERE `caffeinate_campaigns`.`id` = 1 /*application:SS,controller_with_namespace:Caffeinate::Webui::DashboardController,action:show*/
  ↳ /Users/chris/.rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/log_subscriber.rb:98
  Shop Load (193.4ms)  SELECT `shops`.* FROM `shops` WHERE `shops`.`id` IN (39532, 39533, 39534, 39535, 39536, 39538, 39539, 39540, 39541, 39543, 39544, 39850, 39851, 39852, 39857, 39860, 39863, 39865, 39867, 39868, 39869, 39870, 39871, 39872, 39873, 39874, 39545, 39546, 39547, 39548) /*application:SS,controller_with_namespace:Caffeinate::Webui::DashboardController,action:show*/
  ↳ /Users/chris/.rvm/gems/ruby-2.7.8/gems/activerecord-5.2.8.1/lib/active_record/log_subscriber.rb:98
   (202.1ms)  SELECT COUNT(*) FROM `caffeinate_mailings` INNER JOIN `caffeinate_campaign_subscriptions` ON `caffeinate_campaign_subscriptions`.`id` = `caffeinate_mailings`.`caffeinate_campaign_subscription_id` WHERE `caffeinate_mailings`.`skipped_at` IS NULL AND `caffeinate_mailings`.`sent_at` IS NULL AND `caffeinate_campaign_subscriptions`.`unsubscribed_at` IS NULL AND `caffeinate_campaign_subscriptions`.`ended_at` IS NULL /*application:SS,controller_with_namespace:Caffeinate::Webui::DashboardController,action:show*/
  ↳ vendor/gems/rrt-1.2.4/lib/rrt/extensions/will_paginate.rb:7
  Rendered /Users/chris/.rvm/gems/ruby-2.7.8/gems/caffeinate_webui-0.1.0/app/views/caffeinate/webui/dashboard/show.html.erb within caffeinate/webui/layouts/application (1246.3ms)
Completed 500 Internal Server Error in 2445ms (ActiveRecord: 2107.5ms)
chrisedington commented 1 month ago

I also get this when the gem is installed, and it goes away when it's not. Perhaps a Kaminari conflict?

NoMethodError: undefined method per' for #<ActiveRecord::AssociationRelation []> app/controllers/shopfront/site_controller.rb:30:inhome' @featured = @current_shop.products.featured.available_online.rank_by_position.page(params[:page]).per(30) ... (97 additional frame(s) were not displayed)