Getting this error while trying to run my rspec tests (all or all):
Unable to activate activemodel-3.2.15, because activesupport-4.0.1 conflicts
with activesupport (= 3.2.15), builder-3.1.4 conflicts with builder (~> 3.0.0)
In my gemfile there is:
source 'https://rubygems.org'
rails_version = '~> 4.0.0.rc2'
gem 'activerecord', rails_version
gem 'actionpack', rails_version
gem 'rspec', '~> 2.6.0'
gem 'mocha', '~> 0.9.8'
gem 'mongoid', '~> 2.0'
gem 'sqlite3', '~> 1.3.6'
group :mysql do
gem 'mysql', '~> 2.9'
gem 'mysql2', '~> 0.3.10'
end
gem 'pg', '~> 0.11', :group => :pg
group :development do
gem 'ruby-debug', :platforms => :mri_18
gem 'debugger', :platforms => :mri_19
end
Not sure what to change / how to fix.
I tried:
- version of various rails -
4.0.0and3.2.8 - requires "activemodel" instead of activerecord and actionpack
and binding after each, but did not help.
Ruby Version 1.9.3-p194
I tried ruby 2.0, but this gives errors about wrong number of arguments (1 for 0)
I think the problem is with Mongoid.
The test code starts as follows:
before(:all) do
MongoidModel.delete_all
4.times { MongoidModel.create! }
end
let(:criteria) { MongoidModel.criteria }
describe "#page" do
it "should forward to the paginate method" do
expect(criteria(:paginate).with(:page => 2)).to returns("itself")
expect(criteria.page(2)).to eq "itself"
end
I added Mongoid to the Gemfile. The problem may be that its version is not compatible with ruby 2 or rails 4, but not sure, and attempts to solve were unsuccessful.
I tried the moped gem and bundled, but then gotcannot load such file -- mongoid
gem 'mongoid', github: 'mongoid/mongoid' bundle d, , .