I'm working on integrating Vanity into a new Rails 3.1 site, bundling in the gem from the rails3 branch on github.
I have a simple experiment setup to test pricing options, and a simple signup metric. This experiment is running correctly when I view the site.
However, I get a "No Vanity.context" error when visiting the dashboard with that simple experiment in place.
> Showing /Users/adam/.rvm/gems/ruby-1.9.2-p290/bundler/gems/vanity-4a1385954cb9/lib/vanity/templates/_ab_test.erb where line #17 raised.
14: </td>
15: <td class="action">
16: <% if experiment.active? && respond_to?(:url_for) %>
17: <% if experiment.showing?(alt) %>
18: showing
19: <% else %>
20: <a class="button chooses" title="Show me this alternative from now on" href="#"
Has anybody encountered this and can you offer a fix?
My experiment is as follows:ab_test "Free credit giveaway" do
description "Does the free-credit giveaway value affect signups?"
alternatives 1, 2, 3, 4, 5
metrics :signup
end
metric "Signup" do
description "Measures how many people signed up for BackChat.io"
end