ruby-on-rails - AWS ElasticBeanstalk + Ruby on Rails:Bundler `shared_helpers` 错误
问题描述
我正在尝试更新我的 Rails 应用程序的 Ruby 版本,并且在部署到 AWS ElasticBeanstalk 时遇到了 Bundler 问题。
将 Ruby 从版本升级2.3.4
到2.5.7
- 红宝石:2.3.4 -> 2.5.7
- 导轨:5.1.7
- 捆绑器:1.17.3
- 彪马:3.12.1
我的 ElasticBeanstalk 环境正在运行 Ruby-2.5.7,我能够成功部署应用程序。
在我的日志中,我在尝试加载网站时遇到错误。
=== puma startup: 2019-10-22 20:41:56 +0000 ===
=== puma startup: 2019-10-22 20:41:56 +0000 ===
[22501] - Worker 0 (pid: 22504) booted, phase: 0
[22501] - Gracefully shutting down workers...
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
/opt/rubies/ruby-2.5.7/lib/ruby/site_ruby/2.5.0/bundler/shared_helpers.rb:71:in `getwd': No such file or directory - getcwd (Errno::ENOENT)
from /opt/rubies/ruby-2.5.7/lib/ruby/site_ruby/2.5.0/bundler/shared_helpers.rb:71:in `pwd'
from /opt/rubies/ruby-2.5.7/lib/ruby/site_ruby/2.5.0/bundler/shared_helpers.rb:71:in `block in pwd'
from /opt/rubies/ruby-2.5.7/lib/ruby/2.5.0/monitor.rb:235:in `mon_synchronize'
from /opt/rubies/ruby-2.5.7/lib/ruby/site_ruby/2.5.0/bundler/shared_helpers.rb:70:in `pwd'
from /opt/rubies/ruby-2.5.7/lib/ruby/site_ruby/2.5.0/bundler/shared_helpers.rb:272:in `search_up'
from /opt/rubies/ruby-2.5.7/lib/ruby/site_ruby/2.5.0/bundler/shared_helpers.rb:155:in `print_major_deprecations!'
from /opt/rubies/ruby-2.5.7/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:23:in `ensure in start'
from /opt/rubies/ruby-2.5.7/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:23:in `start'
from /opt/rubies/ruby-2.5.7/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/exe/bundle:30:in `block in <top (required)>'
from /opt/rubies/ruby-2.5.7/lib/ruby/site_ruby/2.5.0/bundler/friendly_errors.rb:124:in `with_friendly_errors'
from /opt/rubies/ruby-2.5.7/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/exe/bundle:22:in `<top (required)>'
from /opt/rubies/ruby-2.5.7/bin/bundle:23:in `load'
from /opt/rubies/ruby-2.5.7/bin/bundle:23:in `<main>'
如何使用我的 ElasticBeanstalk 环境解决此问题?
解决方案
推荐阅读
- c# - PartialView 未在 Asp.net MVC 中显示?
- php - parse_url() 在 PHPUnit 和普通 PHP 文件中的行为不同
- c - 双向链表 - 合并排序后更新 list->tail
- c# - 不同平台上的NaCL密封盒
- python - 验证正则表达式:最小/最大字符、一个连字符和开始/结束条件
- c++ - LZW 解码的 C++ 问题
- android - 在开发模式下的应用程序中创建了奇怪的帐户
- reactjs - 必需的属性和类型电子邮件不起作用。ReactJS 和 Materia UI
- python - 如何从 Jupyter 文本小部件中获取鼠标选择的文本?
- python - python 如果目录中的文件都共享相同的权限,则运行正则表达式