split: undefined method `ab_test' for #<#:0x007fcc0e5f8de0>
If I call ab_test in a view I get the exception mentioned.
Including Split::Helper in my ApplicationHelper will solve this, but not sure of the cause.
I’m presuming it’s something to do with load order of Split and the if defined? Rails not getting executed, but can’t seem to get to the bottom of it, so no failing test case at the moment.
Have you encountered this before?
About this issue
- Original URL
- State: closed
- Created 12 years ago
- Comments: 29 (14 by maintainers)
I have the same issue. Though it is strange it started occurring after using the
ab_testmethod with 4 arguments (name, version_1_hash, version_2_hash, version_3_hash). If I change it back to 3 and then to 4 then it works but only until the next server restart.config.include_rails_helper = truedidn’t work for meinclude Split::Helperinapplication_helper.rbworked.@swrobel I worked around the issue by just adding:
to my initializers/split.rb file as @gingerlime suggested.
We’ve had a similar problem with our Rails 3.2 app.
Eventually what seemed to solve it for us was doing this:
Gemfile:
config/initializers/split.rb: