Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 在AWS Elastic Beanstalk上部署应用程序时出现Ruby版本错误_Ruby On Rails_Ruby_Amazon Web Services_Amazon Elastic Beanstalk - Fatal编程技术网

Ruby on rails 在AWS Elastic Beanstalk上部署应用程序时出现Ruby版本错误

Ruby on rails 在AWS Elastic Beanstalk上部署应用程序时出现Ruby版本错误,ruby-on-rails,ruby,amazon-web-services,amazon-elastic-beanstalk,Ruby On Rails,Ruby,Amazon Web Services,Amazon Elastic Beanstalk,我正在尝试在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 need

我正在尝试在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.
错误:[Instance:]命令在实例上失败。返回代码:18输出:(截断)…e']'
+捆绑安装
不要以root用户身份运行Bundler。如果需要,Bundler可以请求sudo,并且
以root用户身份安装捆绑包将破坏所有非root用户的应用程序
此计算机上的用户。
您的Ruby版本是2.4.3,但您的Gemfile指定了2.3.3。
Hook/opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh失败。有关更多详细信息,请使用console或eb CLI检查/var/log/eb-activity.log。
信息:所有实例上的命令执行已完成。摘要:[成功:0,失败:1]。
错误:对实例id“”执行命令失败。正在中止操作。
错误:未能部署应用程序。
在我得到这个错误后,我已经从Gemfile中删除了ruby版本号,但仍然得到了这个错误


之后,我在一个新的Beanstalk环境中部署了这个应用程序,在Gemfile中没有提到Ruby版本。但是我仍然收到相同的错误。

我不使用Beanstalk,但请确保您的Gemfile.lock仍然没有显示旧的ruby版本。进行捆绑安装以刷新它。我已经尝试过了,但没有成功。请发布您的
Gemfile
Gemfile.lock
文件。您解决了这个问题吗?我也一样problem@NomuraNori这里有人解决了这个问题吗。我的ruby版本是最新的,但告诉我是旧的。。。?而且不会进入aws部门