accessd / models_stats Goto Github PK
View Code? Open in Web Editor NEWCharts for your rails models with MetricsGraphics.js and NVD3
License: MIT License
Charts for your rails models with MetricsGraphics.js and NVD3
License: MIT License
When using a very basic .yml file, the rake task for statistics collection fails with NoMethodError: undefined method []' for nil:NilClass
in statistics_collector.rb:15:
config/models_stats.yml:
total_players:
description: "Total players"
model: Player
datetime_attr: :created_at
rake task execution:
$ rake models_stats:collect_stat_for_yesterday
NoMethodError: undefined method `[]' for nil:NilClass
/Users/lukas/workspaces/models_stats/lib/models_stats/statistics_collector.rb:15:in `block in collect'
/Users/lukas/workspaces/models_stats/lib/models_stats/statistics_collector.rb:13:in `each'
/Users/lukas/workspaces/models_stats/lib/models_stats/statistics_collector.rb:13:in `collect'
/Users/lukas/workspaces/models_stats/lib/tasks/models_stats.rake:5:in `block (2 levels) in <top (required)>'
/Users/lukas/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
/Users/lukas/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => models_stats:collect_stat_for_yesterday
(See full trace by running task with --trace)
I’m not sure why this occurs, and tried messing around with the code a bit. It seems that the code assumes a Hash on multiple occurrences while I seem to be getting an Array with my config/models_stats.yml
.
If this is indeed an error in the codebase, instead of an error on my side, I’d be willing to submit an according pull request.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.