0
votes

Error running bundle install command. Ruby version is 2.2.0 and Rails version is 4.1.8. Environment is Apple Mac OS Sierra (10.12.5)

Bundler could not find compatible versions for gem "activerecord":

In Gemfile: composite_primary_keys (= 7.0.15) was resolved to 7.0.15, which depends on activerecord (~> 4.1.7)

rails (= 4.2.4) was resolved to 4.2.4, which depends on
  activerecord (= 4.2.4)

Bundler could not find compatible versions for gem "rack": In Gemfile: rack (~> 1.5.3)

omniauth was resolved to 1.7.1, which depends on
  rack (< 3, >= 1.6.2)

Bundler could not find compatible versions for gem "rails": In Gemfile: rails (= 4.2.4)

commands was resolved to 0.2.1, which depends on
  rails (>= 3.2.0)

model_tree was resolved to 1.0, which depends on
  rails
1

1 Answers

0
votes

You need to upgrade the version of composite_primary_keys gem.

Change it to ~> 8.0.0 which requires activerecord '~>4.2.0'

gem 'composite_primary_keys',  '~> 8.0.0'

Refer composite_primary_keys.gemspec

Similarly, for other gems you can do the same.

Or if you are not sure on the gem versions you can just add gem name and leave the versions for bundler to take care of it.