ruby-on-rails - 在 AWS Elastic Beanstalk 上部署应用程序时出现 Ruby 版本错误
问题描述
我正在尝试在 AWS Elastic Beanstalk 上部署 Ruby on Rails 应用程序。我收到以下错误 -
ERROR: [Instance: <Instance ID>] Command failed on instance. Return code: 18 Output: (TRUNCATED)...e ']'
+ bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Your Ruby version is 2.4.3, but your Gemfile specified 2.3.3.
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
ERROR: Unsuccessful command execution on instance id(s) '<Instance ID>'. Aborting the operation.
ERROR: Failed to deploy application.
收到此错误后,我从 Gemfile 中删除了 ruby 版本号,但仍然收到此错误。
之后,我在一个新的 Beanstalk 环境中部署了应用程序,而没有在 Gemfile 中提及 Ruby 版本。但我仍然遇到同样的错误。
解决方案
推荐阅读
- go - 将结构字段转换为字符串
- android - CryptographyManager 使用的 secretKeyName 是什么?
- c++ - 我不知道为什么它不打印链接列表
- vue.js - 从 vue.js 中的 slot 访问组件数据(没有在郊区声明模板)
- reactjs - 使用 ThreeJS 和 React 三纤执行 React 应用程序时出现“编译失败”错误
- python - python sort numpy ValueError:具有多个元素的数组的真值不明确。使用 a.any() 或 a.all()
- vba - 使用 VBA 自动化 AutoCAD 中的数据
- database - 两个连续的mongodb文档字段之间的区别
- performance - 在项目中同时使用 mokito 和 mockk
- javascript - 不处理响应数据只想使用 fetch 获取响应状态