I hope you’re doing good. Sorry for a long email. I am just trying my
to learn something new and, need your help to understand/ sort a small
issue which I am not able to figure out.
I have create couple of factories and created some examples for rspec
one of my projects. I have got everything working on my local. Even, my
specs are green on local for both ruby version: 1.9.2 and 1.9.3. I just
don’t understand why travis-ci is failing to build the same commit.
Here is the link to travis-ci’s builds:
Job #1(Build 64):
Job #2(Build 65):
Reason why I find this weird is because, build 64 is failing to run
against ruby version of 1.9.2, and passing for 1.9.3. However build 65
failing to run specs against ruby version of 1.9.3, and passing for
And there is no change in code at all for both the builds.
However, for both builds which are failing throw the same error:
find': Factory not registered: active_sale (ArgumentError) from /home/travis/.rvm/gems/ruby-1.9.2-p320/gems/factory_girl-4.2.0/lib/factory_girl/decorator.rb:10:in method_missing’
Since, the code is very long. I’ll reference it from the commit on
What I know, the issue is coming from this line in
at line 5:
factory :active_sale, :class => Spree::ActiveSale do |f|
name "Dummy Sale"end
Which can not be determined from inactive_sale_factories.rb defined
factories, I suppose. But, why is that happening? Why is it working for
different versions for different builds when there is absolutely no code
I am new to rspec and factories and doing all this for first time. It
be very grateful if you can explain this behavior or point out what I am
doing wrong here? Or maybe can help me here to solve this issue?
Just in case if you would prefer/like to answer on Stackoverflow:
Please consider the environment before printing this email.