I am attempting to update my Ruby version of my Rails app and having a Bundler issue on deployment to AWS ElasticBeanstalk.
Upgrading Ruby from version 2.3.4 to 2.5.7
- Ruby: 2.3.4 -> 2.5.7
- Rails: 5.1.7
- Bundler: 1.17.3
- Puma: 3.12.1
My ElasticBeanstalk Environment is running Ruby-2.5.7 and I am able to successfully deploy the application.
In my logs I am encountering an error when attempting to load the website.
=== 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>'
How can I resolve this issue with my ElasticBeanstalk environment?