Hi I am trying to setup Vanity gem into a rail 3 application. I am creating a custom metric to experiment a bit.
So I created it following the suggestions on their website:
metric "Signups" do
description "Signups completed"
def values(from, to)
(from..to).map { |i| 24 }
end
end
I get the following error when running this experiment
Thank you!
There seems to be an error in the gem:
in this file .rvm/gems/ruby-1.9.2-p290/gems/vanity-1.7.1/lib/vanity/templates/_metric.erb
where we can read the following line
js = data.map { |date,value| "['#{**date.to_time.httpdate**}',#{value}]" }.join(",")
vanity_html_safe(%{<div class="chart"></div>
if we change date.to_time.httpdate to date.to_s.to_time.httpdate it works.