rake spec doesn't find methods provided by shoulda-matchers, and capybara doesn't find the webkit plugin

I have a rails 3.0.20 application that uses rspec 2.12, capybara and capybara-webkit, and shoulda-matchers. All of the specs pass when run locally on my macbook. On the Teamcity build agent server, most tests pass, except for the ones that require shoulda-matchers or webkit. In the case of shoulda-matchers, I get errors like this:

    NoMethodError: undefined method `belong_to' for #<RSpec::Core::ExampleGroup::Nested_423:0x00000019809710>

The relevant gems are all specified in my Gemfile, and they installed on the build agent just fine during the 'bundle install' step. How should I go about figuring out why these gems are being ignored when TeamCity runs the specs?

Thanks for your help.

Please sign in to leave a comment.