【问题标题】:Elastic Beanstalk AWS Rails Bundle Install FailureElastic Beanstalk AWS Rails 捆绑包安装失败
【发布时间】:2020-09-10 14:40:17
【问题描述】:

我正在尝试使用 AWS 和 Elastic Beanstalk 部署我的 rails 应用程序。我的部署有效,但运行状况处于“红色”状态 - 错误 11(捆绑安装失败)。

我试过了: $ gem 更新捆绑器 $ 捆绑包 --all

还是同样的错误。

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
# ruby "2.4.1"
+ '[' -d /var/app/ondeck/vendor/cache ']'
+ 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.
Warning: the running version of Bundler (1.16.0) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Fetching gem metadata from https://rubygems.org/.........
Fetching https://github.com/mshibuya/remotipart.git
sh: git: command not found

Retrying `git clone 'https://github.com/mshibuya/remotipart.git' "/opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/cache/bundler/git/remotipart-f9606ede17c5ca255592b042ebded6ea195ac779" --bare --no-hardlinks --quiet` due to error (2/4): Bundler::Source::Git::GitCommandError Git error: command `git clone 'https://github.com/mshibuya/remotipart.git' "/opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/cache/bundler/git/remotipart-f9606ede17c5ca255592b042ebded6ea195ac779" --bare --no-hardlinks --quiet` in directory /var/app/ondeck has failed.sh: git: command not found

Retrying `git clone 'https://github.com/mshibuya/remotipart.git' "/opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/cache/bundler/git/remotipart-f9606ede17c5ca255592b042ebded6ea195ac779" --bare --no-hardlinks --quiet` due to error (3/4): Bundler::Source::Git::GitCommandError Git error: command `git clone 'https://github.com/mshibuya/remotipart.git' "/opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/cache/bundler/git/remotipart-f9606ede17c5ca255592b042ebded6ea195ac779" --bare --no-hardlinks --quiet` in directory /var/app/ondeck has failed.sh: git: command not found

Retrying `git clone 'https://github.com/mshibuya/remotipart.git' "/opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/cache/bundler/git/remotipart-f9606ede17c5ca255592b042ebded6ea195ac779" --bare --no-hardlinks --quiet` due to error (4/4): Bundler::Source::Git::GitCommandError Git error: command `git clone 'https://github.com/mshibuya/remotipart.git' "/opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/cache/bundler/git/remotipart-f9606ede17c5ca255592b042ebded6ea195ac779" --bare --no-hardlinks --quiet` in directory /var/app/ondeck has failed.sh: git: command not found

Git error: command `git clone 'https://github.com/mshibuya/remotipart.git'
"/opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/cache/bundler/git/remotipart-f9606ede17c5ca255592b042ebded6ea195ac779"
--bare --no-hardlinks --quiet` in directory /var/app/ondeck has failed.

【问题讨论】:

    标签: ruby-on-rails ruby amazon-web-services amazon-elastic-beanstalk


    【解决方案1】:

    你需要安装 git。 你可以在你的 Rails 应用中创建一个 .ebextensions/git.config 文件:

    packages:
      yum:
        git: []
    

    然后尝试再次部署

    【讨论】:

      【解决方案2】:

      默认情况下,负载均衡器目标组使用“/”进行健康检查。确保您的 Rails 应用以 200 状态响应该端点,或者您可以将运行状况检查路径更新为相关路径。

      【讨论】:

        猜你喜欢
        • 2014-10-27
        • 2017-01-24
        • 1970-01-01
        • 1970-01-01
        • 2014-11-15
        • 2018-12-10
        • 2015-10-19
        相关资源
        最近更新 更多