I would like to see the rails application in elastic beanstalk, but I can be angry at the ruby version. However, no description of 2.4.1 can be found anywhere. What kind of problem do you think?
Creating application version archive "xxx".
Uploading xxx.zip to S3. This may take a while.
Upload Complete.
2019-06-17 12:33:43 INFO Environment update is starting.
2019-06-17 12:33:49 INFO Deploying new version to instance(s).
2019-06-17 12:33:57 ERROR [Instance: xxx] 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.6.3, but your Gemfile specified 2.4.1.
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.
2019-06-17 12:33:57 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2019-06-17 12:33:57 ERROR Unsuccessful command execution on instance id(s) 'xxx'. Aborting the operation.
2019-06-17 12:33:57 ERROR Failed to deploy application.
ruby '2.6.3'
local ruby version ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
Elastic Beanstalk Puma with Ruby 2.6 running on 64bit Amazon Linux/2.9.5
The Elastic Beanstalk instance is set up to use Ruby 2.6, but in the Gemfile
in the root of your application, you have a line like:
# Gemfile
ruby '2.4.1'
which declares that you are using Ruby 2.4.1.
You need to either change the Ruby version to '2.6.3' in the Gemfile and re-run bundle install
to update the Gemfile.lock
version, or you need to recreate your Elastic Beanstalk environment using the Ruby 2.4 version platform. If you recreate the Elastic Beanstalk environment, they may use a different patch version of Ruby 2.4, so you may have to update your Gemfile to match the Ruby version that Elastic Beanstalk is using anyway.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.