我正在尝试在AWS上部署一个狂欢应用程序。 设置弹性beanstalk并添加到 my_project / .ebextensions / this .config file
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
我使用git aws.push来部署我的应用程序,只是为了收到此错误消息:
在任何来源中找不到rake-10.1.0(Bundler :: GemNotFound)
使用我的宝石套装仔细检查 捆绑展示耙 给了我:
... /gems/rake-10.1.0
从AWS查看日志文件时发现此错误:
sh:git:找不到命令 Git错误:命令`git clone'https://github.com/spree/spree.git'
我做错了什么?
答案 0 :(得分:7)
您需要确保在服务器上安装了git。
尝试创建一个名为:
的文件.ebextensions/YOUR_APPLICATION_NAME.config
包含
packages:
yum:
git: []
这将在部署过程中使用yum安装git。
另一个选择是使用gem中的spree而不是从git中获取它。
有关更多信息,请查看此article on the AWS Blog有关将Ruby应用程序部署到Elastic Beanstalk的信息。