简体   繁体   English

捆绑安装命令错误。 Ruby版本为2.2.0,Rails版本为4.1.8

[英]Bundle install command error. Ruby version is 2.2.0 and Rails version is 4.1.8

Error running bundle install command. 运行软件包安装命令时出错。 Ruby version is 2.2.0 and Rails version is 4.1.8. Ruby版本为2.2.0,Rails版本为4.1.8。 Environment is Apple Mac OS Sierra (10.12.5) 环境是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) 在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 could not find compatible versions for gem "rack": In Gemfile: rack (~> 1.5.3) Bundler找不到与宝石“ rack”兼容的版本:在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) Bundler找不到与宝石“ 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

You need to upgrade the version of composite_primary_keys gem. 您需要升级composite_primary_keys gem的版本。

Change it to ~> 8.0.0 which requires activerecord '~>4.2.0' 将其更改为~> 8.0.0 ,这需要活动记录'〜> 4.2.0'

gem 'composite_primary_keys',  '~> 8.0.0'

Refer composite_primary_keys.gemspec 请参阅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. 或者,如果您不确定gem版本,则可以添加gem名称,然后将版本留给bundler处理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM