简体   繁体   English

无法成功部署到 Beanstalk

[英]Can't make successful deploy to Beanstalk

I'm using the eb CLI to deploy my RoR API to Beanstalk, and although the deploy works, the app degrated .我正在使用eb CLI 将我的 RoR API 部署到 Beanstalk,尽管部署有效,但应用程序已降级 I can see that it fails with:我可以看到它失败了:

+ bundle install
/opt/rubies/ruby-2.5.7/lib/ruby/site_ruby/2.5.0/rubygems.rb:284:in `find_spec_for_exe': Could not find 'bundler' (2.1.4) required by your /var/app/ondeck/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.1.4`
from /opt/rubies/ruby-2.5.7/lib/ruby/site_ruby/2.5.0/rubygems.rb:303:in `activate_bin_path'
from /opt/rubies/ruby-2.5.7/bin/bundle:23:in `<main>'.

I'm not finding in the AWS docs what I should do to fix this and prevent from happening again.我没有在 AWS 文档中找到我应该做些什么来解决这个问题并防止再次发生。 Has anyone experienced the same, or knows why it's happening, and more important, how to fix it.有没有人经历过同样的事情,或者知道为什么会这样,更重要的是,如何解决它。

The bundler version of your elastic beanstalk is not 2.1.4 which is required by your project.您的弹性 beanstalk 的捆绑版本不是您的项目所需的 2.1.4。 Add an elastic beanstalk config file to upgrade the pre-installed bundler of elastic beanstalk.添加一个 elastic beanstalk 配置文件来升级 elastic beanstalk 的预装 bundler。

#.ebextensions/bundler_update.config

commands:
  update_bundler:
    command: /opt/rubies/ruby-2.5.7/bin/gem install bundler -v 2.1.4

Ruby and Bundler version should match yours. Ruby 和 Bundler 版本应该与您的匹配。

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

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