amazon-elastic-beanstalk - 用于 sinatra 应用程序的 aws beanstalk - 找不到 /var/app/ondeck/Gemfile.lock 所需的“捆绑程序”(2.0.2)
问题描述
摘要:当我的尝试失败时,如何让 beanstalk 使用 bundler 2
尝试使用 Elastic Beanstalk 部署 Sinatra 应用程序
我得到(日志)
...
+ cat Gemfile
source 'https://rubygems.org'
gem 'sinatra'
gem 'aws-sdk-s3'
+ '[' -d /var/app/ondeck/vendor/cache ']'
+ bundle install
/opt/rubies/ruby-2.6.5/lib/ruby/site_ruby/2.6.0/rubygems.rb:284:in `find_spec_for_exe': Could not find 'bundler' (2.0.2) 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.0.2`
from /opt/rubies/ruby-2.6.5/lib/ruby/site_ruby/2.6.0/rubygems.rb:303:in `activate_bin_path'
from /opt/rubies/ruby-2.6.5/bin/bundle:23:in `<main>' (Executor::NonZeroExitStatus)
我尝试更改config.ru
和添加
require './app.rb'
gem install bundler:2.0.2 # <-- added this
bundle update --bundler # <-- added this
bundle # <-- added this
run Sinatra::Application
但这并没有帮助 - 似乎没有改变行为。
甚至是config.ru
要更改的正确文件吗?不管有没有我的 bundle 命令,它似乎都会尝试 bundle 。
我尝试从包中删除我的 Gemfile.lock 文件,这很有效。
但是,我想知道如何每次都避免这种情况,并且无需将本地系统恢复为旧的捆绑器 1。换句话说,当我的尝试失败时,如何让 beanstalk 使用捆绑器 2。
解决方案
推荐阅读
- php - php 正在验证一个无效的 url URL
- vue.js - Vue-CLI的逐步调试
- php - Android应用程序解码来自PHP MySql数据库的JSON响应,没有特殊字符
- r - 如何使用 R 对 NeuralNet 模型使用分类/因子输入
- javascript - PropTypes 给我一个字符串类型错误
- agda - 为什么将 Size 定义为参数与索引时的处理方式不同?
- spring - 使用 @ResponseBody 返回 BigDecimal 精度丢失
- permissions - 如何查看 Android 10 中权限的分组方式
- javascript - 如何使用 Javascript 从 URL 获取视频格式
- android - 加密 Room 数据库的特定列