Ruby on rails 4 eb部署总是失败
我已经在amazon elastic beanstalk上创建了一个ruby env,但是当我尝试使用Ruby on rails 4 eb部署总是失败,ruby-on-rails-4,amazon-elastic-beanstalk,Ruby On Rails 4,Amazon Elastic Beanstalk,我已经在amazon elastic beanstalk上创建了一个ruby env,但是当我尝试使用eb deploy从命令行部署我的rails应用程序时,我遇到以下错误: 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 o
eb deploy
从命令行部署我的rails应用程序时,我遇到以下错误:
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.
You need to install git to be able to use gems from git repositories. For help
installing git, please refer to GitHub's tutorial at
https://help.github.com/articles/set-up-git (Executor::NonZeroExitStatus)
[2015-08-09T15:50:38.513Z] INFO [4217] - [CMD-AppDeploy/AppDeployStage0/AppDeployPreHook/10_bundle_install.sh] : Activity failed.
[2015-08-09T15:50:38.513Z] INFO [4217] - [CMD-AppDeploy/AppDeployStage0/AppDeployPreHook] : Activity failed.
[2015-08-09T15:50:38.513Z] INFO [4217] - [CMD-AppDeploy/AppDeployStage0] : Activity failed.
[2015-08-09T15:50:38.514Z] INFO [4217] - [CMD-AppDeploy] : Completed activity. Result:
Command CMD-AppDeploy failed.
那么,我应该直接在amazon实例bash上安装git吗?这会影响自动缩放吗?我不知道您是否修复了此问题,但您需要告诉Elastic Beanstalk安装
git
在项目的根目录中,添加名为.ebextensions
的文件夹
在该文件夹中创建一个名为(类似于)install\u git.config
(重要的是.config
)的文件
将以下行添加到该文件:
packages:
yum:
git: []
然后重新部署你的应用程序,你就不会再看到这个错误了。我不知道你是否修复了这个问题,但是你需要告诉Elastic Beanstalk安装
git
在项目的根目录中,添加名为.ebextensions
的文件夹
在该文件夹中创建一个名为(类似于)install\u git.config
(重要的是.config
)的文件
将以下行添加到该文件:
packages:
yum:
git: []
然后重新部署您的应用程序,您将不会再看到该错误