joshmn / ahoy_captain

A full-featured, mountable analytics dashboard for your Rails app, powered by the Ahoy gem.
MIT License
356 stars 18 forks source link

First time run immediately crashes #36

Closed johnmcdowall closed 8 months ago

johnmcdowall commented 10 months ago

Just installed the gem, and I do have some events to show:

But the dashboard shows up with some placeholder skeletons, then immediately crashes:

Screenshot 2023-11-01 at 21 09 20

I can circumvent the crash by adding return 0 if value.current.nil? || value.compared_to.nil? before the diff calculation. Happy to open a PR unless you want the comparable itself to have safer logic.

johnmcdowall commented 8 months ago

Seems fixed now.

abuisman commented 5 months ago

Sadly I have this error now too.

I've created a fork to include the latest version and the fix for the shims described here: https://github.com/joshmn/ahoy_captain/pull/40

I have more than 1000 events in my database that should be eligible.