在AWS上部署spree

Mio*_*tsu 1 github amazon-web-services spree amazon-elastic-beanstalk

我正在尝试在AWS上部署一个狂欢应用程序.设置elastic-beanstalk并添加到my_project/.ebextensions/this .config文件之后

packages:
  yum:
    git-core: []
container_commands:
  bundle:
    command: "gem install bundle"
  assets:
    command: "bundle exec rake assets:precompile"
  db:
    command: "bundle exec rake db:migrate"
    leader_only: true
Run Code Online (Sandbox Code Playgroud)

我使用git aws.push来部署我的应用程序,只是为了得到这个错误消息:

在任何来源中都找不到rake-10.1.0(Bundler :: GemNotFound)

仔细检查我的宝石套装,使用捆绑show rake给我:

... /gems/rake-10.1.0

从AWS查看日志文件时,我发现此错误:

sh:git:命令未找到Git错误:命令`git clone'https://github.com/spree/spree.git '

我究竟做错了什么?

gma*_*all 7

您需要确保在服务器上安装了git.

尝试创建一个名为的文件:

.ebextensions/YOUR_APPLICATION_NAME.config
Run Code Online (Sandbox Code Playgroud)

其中包含

packages:
  yum:
    git: []
Run Code Online (Sandbox Code Playgroud)

这将在部署时安装带yum的git.

另一个选择是使用gem中的spree而不是从git中获取它.

有关更多信息,请参阅AWS博客上有关将Ruby应用程序部署到Elastic Beanstalk的文章.