简体   繁体   中英

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

I have tried Elastic Beanstalk for rails. When I run eb deploy I got this error. I need to install at least 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.

file name:
.ebextensions/upgrade_bundler.config

file content: 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. I am running an older version of Elastic beanstalk box, so feel free to change the ruby paths to fit your box.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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