Rails3 branch issue when viewing dashboard

71 views
Skip to first unread message

Adam

unread,
Jan 12, 2012, 9:48:05 AM1/12/12
to vanit...@googlegroups.com
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

Adam

unread,
Jan 12, 2012, 10:00:55 AM1/12/12
to vanit...@googlegroups.com
I solved my own problem. 

For future reference, as a lesson to others, make sure you include "use_vanity" within your application_controller, not just the controller doing the experiments.
Reply all
Reply to author
Forward
0 new messages