[英]I would like to see the rails application in elastic beanstalk, but I can be angry at the ruby version
I would like to see the rails application in elastic beanstalk, but I can be angry at the ruby version. 我想在弹性beanstalk中看到rails应用程序,但我可能会对ruby版本感到愤怒。 However, no description of 2.4.1 can be found anywhere.
但是,在任何地方都找不到2.4.1的描述。 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] 本地ruby版本ruby 2.6.3p62(2019-04-16修订版67580)[x86_64-darwin18]
Elastic Beanstalk Puma with Ruby 2.6 running on 64bit Amazon Linux/2.9.5 Elastic Beanstalk Puma,Ruby 2.6在64位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: Elastic Beanstalk实例设置为使用Ruby 2.6,但在应用程序根目录的
Gemfile
中,您有一行如下:
# Gemfile
ruby '2.4.1'
which declares that you are using Ruby 2.4.1. 它声明您使用的是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. 您需要在Gemfile中将Ruby版本更改为“2.6.3”并重新运行
bundle install
以更新Gemfile.lock
版本,或者需要使用Ruby 2.4版本平台重新创建Elastic Beanstalk环境。 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. 如果重新创建Elastic Beanstalk环境,他们可能会使用不同的Ruby 2.4补丁版本,因此您可能必须更新Gemfile以匹配Elastic Beanstalk正在使用的Ruby版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.