运行bundle install命令时出错。 Ruby版本是2.2.0,Rails版本是4.1.8。环境是Apple Mac OS Sierra(10.12.5)
Bundler could not find compatible versions for gem "activerecord":
在Gemfile中: composite_primary_keys(= 7.0.15)被解析为7.0.15,这取决于 activerecord(〜> 4.1.7)
rails (= 4.2.4) was resolved to 4.2.4, which depends on
activerecord (= 4.2.4)
Bundler找不到gem“rack”的兼容版本: 在Gemfile中: 机架(〜> 1.5.3)
omniauth was resolved to 1.7.1, which depends on
rack (< 3, >= 1.6.2)
Bundler找不到gem“rails”的兼容版本: 在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
答案 0 :(得分:0)
您需要升级composite_primary_keys
gem的版本。
将其更改为~> 8.0.0
,需要activerecord'〜&gt; 4.2.0'
gem 'composite_primary_keys', '~> 8.0.0'
参考composite_primary_keys.gemspec
同样,对于其他宝石,您也可以这样做。
或者如果你不确定gem版本,你可以添加gem名称并保留bundler
的版本来处理它。