Denniss I get the same error for the reporting side. Logging the
"path" variable inside the report.rb file the stack trace mentions, it
looks like it is being called twice. The first time it is a string,
which looks like is what the code depends on it being, the second time
it is a hash. Here is the first part of the path variable hash I see.
I've only created the experiment and metric mentioned in the 2-minute
demo. I have the following ruby and gem setup:
ree-1.8.7-2010.02@rails3:
ruby:
interpreter: "ruby"
version: "1.8.7"
{:locals=>{:experiments=>{:price_options=>#<Vanity::Experiment::AbTest:
0x105b42f20 @alternatives=[19, 25, 29], @name="Price options",
@id=:price_options, @metrics=[#<Vanity::Metric:0x105b42430
@hooks=[#<Proc:0x0000000105b41698@/Users/andy/Projects/optimizer/
vendor/gems/ruby/1.8/gems/vanity-1.5.1/lib/vanity/experiment/
ab_test.rb:412>], @id=:signup, @name="Signup (Activation
I don't know why it is a hash at any point. But it does look like a
bug with rails 3. Not being able to run the report is bad.
On Dec 28 2010, 9:39 pm, denniss <adamanti...@gmail.com> wrote:
> I am trying to get Vanity to run on Rails 3 and I got everything set
> up and was able to start the rails server. However, I do not know how
> to convert
> map.vanity "/vanity/:action/:id", :controller=>:vanity
> to the rails 3 format and when i tried running the
> 'vanity report' command, I got this
> :kobe denniss$ vanity report --output vanity.html
> /Users/denniss/.rvm/gems/ruby-1.8.7-p174/gems/vanity-1.5.1/lib/vanity/
> commands/report.rb:17:in `split': can't convert Hash into String
> (TypeError)
> from /Users/denniss/.rvm/gems/ruby-1.8.7-p174/gems/vanity-1.5.1/lib/
> vanity/commands/report.rb:17:in `render'
> from /Users/denniss/.rvm/gems/ruby-1.8.7-p174/gems/vanity-1.5.1/lib/
> vanity/templates/_report.erb:18:in `render'
> from /Users/denniss/.rvm/gems/ruby-1.8.7-p174/gems/vanity-1.5.1/lib/
> vanity/commands/report.rb:21:in `render'
> from /Users/denniss/.rvm/gems/ruby-1.8.7-p174/gems/vanity-1.5.1/lib/
> vanity/commands/report.rb:21:in `instance_eval'
> from /Users/denniss/.rvm/gems/ruby-1.8.7-p174/gems/vanity-1.5.1/lib/
> vanity/commands/report.rb:21:in `render'
> from /Users/denniss/.rvm/gems/ruby-1.8.7-p174/gems/vanity-1.5.1/lib/
> vanity/commands/report.rb:51:in `report'
> from /Users/denniss/.rvm/gems/ruby-1.8.7-p174/gems/vanity-1.5.1/bin/
> vanity:60
> from /Users/denniss/.rvm/gems/ruby-1.8.7-p174/gems/vanity-1.5.1/bin/
> vanity:56:in `each'
> from /Users/denniss/.rvm/gems/ruby-1.8.7-p174/gems/vanity-1.5.1/bin/
> vanity:56
> from /Users/denniss/.rvm/gems/ruby-1.8.7-p174/bin/vanity:19:in `load'
> from /Users/denniss/.rvm/gems/ruby-1.8.7-p174/bin/vanity:19