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

时间:2015-05-14 15:17:48

标签: ruby-on-rails ruby amazon-web-services elastic-beanstalk

我试过Elastic Beanstalk for rails。当我运行eb deploy时出现此错误。我需要至少安装bundler 1.8.4。知道如何解决这个问题吗?

 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)

2 个答案:

答案 0 :(得分:5)

为了在弹性beanstalk上升级bundler,你应该创建一个扩展,并确保在路径中使用ruby-current

文件名:
.ebextensions/upgrade_bundler.config

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

答案 1 :(得分:2)

我正在通过向我的项目添加弹性beanstalk配置文件来升级预安装的bundler。我正在运行旧版的Elastic beanstalk盒子,所以请随意更改红宝石路径以适合您的盒子。

文件名:
.ebextensions/upgrade_bundler.config

文件内容:

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