简体   繁体   English

Elastic Beanstalk,Bundler找不到gem“bundler”的兼容版本

[英]Elastic Beanstalk, Bundler could not find compatible versions for gem “bundler”

I have tried Elastic Beanstalk for rails. 我试过Elastic Beanstalk for rails。 When I run eb deploy I got this error. 当我运行eb deploy时出现此错误。 I need to install at least bundler 1.8.4. 我需要至少安装bundler 1.8.4。 Any idea how to resolve this? 知道如何解决这个问题吗?

 Bundler could not find compatible versions for gem "bundler":
    In Gemfile:
      bundler (>= 1.8.4) ruby

  Current Bundler version:
     bundler (1.7.3)

 This Gemfile requires a different version of Bundler.
 Perhaps you need to update Bundler by running `gem install bundler`? (Executor::NonZeroExitStatus)

In order to upgrade bundler on elastic beanstalk you should create an extenstion and be sure to use ruby-current in the path. 为了在弹性beanstalk上升级bundler,你应该创建一个扩展,并确保在路径中使用ruby-current

file name: 文档名称:
.ebextensions/upgrade_bundler.config

file content: commands: install_bundler: command: /opt/rubies/ruby-current/bin/gem install bundler -v 1.14.6 文件内容: commands: install_bundler: command: /opt/rubies/ruby-current/bin/gem install bundler -v 1.14.6

I am upgrading the pre-installed bundler by adding an elastic beanstalk config file to my project. 我正在通过向我的项目添加弹性beanstalk配置文件来升级预安装的bundler。 I am running an older version of Elastic beanstalk box, so feel free to change the ruby paths to fit your box. 我正在运行旧版的Elastic beanstalk盒子,所以请随意更改红宝石路径以适合您的盒子。

file name: 文档名称:
.ebextensions/upgrade_bundler.config

file content: 文件内容:

commands:
  update_bundler:
    command: /opt/rubies/ruby-2.1.5/bin/gem install bundler -v 1.8.4

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

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