【问题标题】:Deploying spree on AWS在 AWS 上部署狂欢
【发布时间】:2013-08-16 10:52:11
【问题描述】:

我正在尝试在 AWS 上部署一个 spree 应用程序。 设置 elastic-beanstalk 并添加到 my_project/.ebextensions/ 这个 .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

我使用 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'

我做错了什么?

【问题讨论】:

    标签: github amazon-web-services spree amazon-elastic-beanstalk


    【解决方案1】:

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

    尝试创建一个名为:

    .ebextensions/YOUR_APPLICATION_NAME.config
    

    其中包含

    packages:
      yum:
        git: []
    

    这将使用 yum 安装 git 作为部署的一部分。

    另一种选择是使用 gem 中的 spree,而不是从 git 中获取它。

    有关更多信息,请查看article on the AWS Blog,了解如何将 Ruby 应用程序部署到 Elastic Beanstalk。

    【讨论】:

    • 这当然有帮助。谢谢。更多,我在 vendor/bundle 和 precompile store/shared/_print.css 中安装了我的 gems
    • 只要您没有在本地安装任何 gem,它就可以工作。这是一个更全面的答案。 stackoverflow.com/questions/13642171/…
    猜你喜欢
    • 1970-01-01
    • 2019-10-27
    • 1970-01-01
    • 2023-03-16
    • 2020-08-18
    • 1970-01-01
    • 2014-01-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多