在 Amazon Linux 2 上部署 Rails 应用程序时构建失败

时间:2021-07-23 05:32:48

标签: ruby-on-rails amazon-web-services bundler amazon-linux-2

我正在将现有的 Rails 应用程序从 Amazon Linux AMI 迁移到 Amazon Linux 2。我能够将 Rails linux 环境升级到 AL2,但部署失败。

我使用的部署过程是通过 CodePipeline 通过 CloudFormation 模板

ApplicationCodePipeline:
  Type: AWS::CodePipeline::Pipeline
  DependsOn:
    - RailsApplication
    - RailsWebEnvironment
    - RailsWorkerEnvironment
  Properties:
    RoleArn: !ImportValue ApplicationRoleArn
    Stages:
      -
        Name: Source
        Actions:
          -
            Name: SourceAction
            ActionTypeId:
              Category: Source
              Owner: AWS
              Version: 1
              Provider: CodeCommit
            OutputArtifacts:
              - Name: SourceOutput
            Configuration:
              BranchName: !Ref RepositoryBranch
              RepositoryName: !GetAtt DeploymentRepository.Name
            RunOrder: 1
      -
        Name: Release
        Actions:
          -
            Name: WebReleaseAction
            ActionTypeId:
              Category: Deploy
              Owner: AWS
              Version: 1
              Provider: ElasticBeanstalk
            InputArtifacts:
              - Name: SourceOutput
            OutputArtifacts: []
            Configuration:
              ApplicationName: !Ref RailsApplication
              EnvironmentName: !Ref RailsWebEnvironment
            RunOrder: 1
          -
            Name: WorkerReleaseAction
            ActionTypeId:
              Category: Deploy
              Owner: AWS
              Version: 1
              Provider: ElasticBeanstalk
            InputArtifacts:
              - Name: SourceOutput
            OutputArtifacts: []
            Configuration:
              ApplicationName: !Ref RailsApplication
              EnvironmentName: !Ref RailsWorkerEnvironment
            RunOrder: 1
    ArtifactStore:
      Type: S3
      Location: !Ref DeploymentBucket

错误线索:

2021/07/22 14:06:16.376532 [INFO] Starting...
2021/07/22 14:06:16.376704 [INFO] Starting EBPlatform-PlatformEngine
2021/07/22 14:06:16.376799 [INFO] reading event message file
2021/07/22 14:06:16.376985 [INFO] no eb envtier info file found, skip loading env tier info.
2021/07/22 14:06:16.377119 [INFO] Engine received EB command userdata-exec
2021/07/22 14:06:16.393074 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-east-1:ACCOUNTID:stack/awseb-envID-stack/99999999-afaf-11ea-8b63 -r AWSEBAutoScalingGroup --region us-east-1
2021/07/22 14:06:16.697134 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-east-1:ACCOUNTID:stack/awseb-envID-stack/99999999-afaf-11ea-8b63 -r AWSEBBeanstalkMetadata --region us-east-1
2021/07/22 14:06:17.035090 [INFO] Unable to ping launch url, this is a scale-up instance.
2021/07/22 14:06:17.035168 [INFO] Engine command: (self-startup)
2021/07/22 14:06:17.035180 [INFO] Downloading EB Application...
2021/07/22 14:06:17.035185 [INFO] Region: us-east-1
2021/07/22 14:06:17.035189 [INFO] envID: envID
2021/07/22 14:06:17.035194 [INFO] envBucket: elasticbeanstalk-us-east-1-ACCOUNTID
2021/07/22 14:06:17.035199 [INFO] Using manifest file name from command request
2021/07/22 14:06:17.035212 [INFO] Unable to get version manifest file.
2021/07/22 14:06:17.035217 [INFO] Downloading latest manifest available.
2021/07/22 14:06:17.035221 [INFO] Download latest app version manifest
2021/07/22 14:06:17.035328 [INFO] resources/environments/envID/_runtime/versions/manifest
2021/07/22 14:06:17.095893 [INFO] latestManifest key *: resources/environments/envID/_runtime/versions/manifest_01234567891011
2021/07/22 14:06:17.096108 [INFO] Downloading: bucket: elasticbeanstalk-us-east-1-ACCOUNTID, object: /resources/environments/envID/_runtime/versions/manifest_01234567891011
2021/07/22 14:06:17.111209 [INFO] Download successful170bytes downloaded
2021/07/22 14:06:17.111370 [INFO] Trying to read and parse version manifest...
2021/07/22 14:06:17.114024 [INFO] Downloading: bucket: elasticbeanstalk-us-east-1-ACCOUNTID, object: /resources/environments/envID/_runtime/_versions/myApp/code-pipeline-PIPELINENO
2021/07/22 14:06:17.333707 [INFO] Download successful14681002bytes downloaded
2021/07/22 14:06:17.334068 [INFO] Executing instruction: SyncClock
2021/07/22 14:06:17.334092 [INFO] Starting SyncClock
2021/07/22 14:06:17.334107 [INFO] Running command /bin/sh -c /usr/bin/chronyc tracking
2021/07/22 14:06:17.338390 [INFO] Reference ID    : A9FEA97B (169.254.169.123)
Stratum         : 4
Ref time (UTC)  : Thu Jul 22 14:06:00 2021
System time     : 0.000000000 seconds fast of NTP time
Last offset     : -0.000000354 seconds
RMS offset      : 0.000003704 seconds
Frequency       : 3.598 ppm fast
Residual freq   : -0.000 ppm
Skew            : 0.056 ppm
Root delay      : 0.000534462 seconds
Root dispersion : 0.000283713 seconds
Update interval : 16.2 seconds
Leap status     : Normal

2021/07/22 14:06:17.338466 [INFO] Running command /bin/sh -c /usr/bin/chronyc -a makestep
2021/07/22 14:06:17.340858 [INFO] 200 OK
2021/07/22 14:06:17.340897 [INFO] Skipping Configure OS
2021/07/22 14:06:17.340905 [INFO] Skipping LockGUID
2021/07/22 14:06:17.340912 [INFO] Skipping GenerateEBBanner
2021/07/22 14:06:17.340921 [INFO] Skipping Install Process Manager
2021/07/22 14:06:17.340927 [INFO] Skipping install proxy
2021/07/22 14:06:17.340933 [INFO] Skipping installhealthd
2021/07/22 14:06:17.340940 [INFO] Skipping Install Log Streaming Manager
2021/07/22 14:06:17.340947 [INFO] Skipping install X-Ray
2021/07/22 14:06:17.340954 [INFO] Skipping install Third Party License
2021/07/22 14:06:17.340962 [INFO] Skipping installSqsd
2021/07/22 14:06:17.340969 [INFO] Skipping bootstraphealthd
2021/07/22 14:06:17.340975 [INFO] Skipping GetSetupProxyLog
2021/07/22 14:06:17.340981 [INFO] Skipping Install yum packages
2021/07/22 14:06:17.340987 [INFO] Skipping Install Bundles
2021/07/22 14:06:17.340996 [INFO] Skipping set up default ruby runtime
2021/07/22 14:06:17.341050 [INFO] Skipping MarkBaked
2021/07/22 14:06:17.341094 [INFO] Skipping TuneSystemSettings
2021/07/22 14:06:17.341101 [INFO] Executing instruction: GetSetupLogRotate
2021/07/22 14:06:17.341106 [INFO] Initialize LogRotate files and directories
2021/07/22 14:06:17.356375 [INFO] Skipping BootstrapCFNHup
2021/07/22 14:06:17.356403 [INFO] Executing instruction: StartCFNHup
2021/07/22 14:06:17.356409 [INFO] Start cfn-hup
2021/07/22 14:06:17.356431 [INFO] Running command /bin/sh -c systemctl is-active cfn-hup.service
2021/07/22 14:06:17.360352 [INFO] cfn-hup process is running, skip installation
2021/07/22 14:06:17.360380 [INFO] Skipping SetupPublishLogCronjob
2021/07/22 14:06:17.360391 [INFO] Skipping MarkBootstrapped
2021/07/22 14:06:17.360400 [INFO] Executing instruction: Save CFN Stack Info
2021/07/22 14:06:17.360562 [INFO] Starting SwitchCFNStack
2021/07/22 14:06:17.360577 [INFO] Executing instruction: stopSqsd
2021/07/22 14:06:17.360582 [INFO] This is a web server environment instance, skip stop sqsd daemon ...
2021/07/22 14:06:17.360592 [INFO] Executing instruction: PreBuildEbExtension
2021/07/22 14:06:17.360686 [INFO] Starting executing the config set Infra-EmbeddedPreBuild.
2021/07/22 14:06:17.360704 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-init -s arn:aws:cloudformation:us-east-1:ACCOUNTID:stack/awseb-envID-stack/99999999-afaf-11ea-8b63 -r AWSEBAutoScalingGroup --region us-east-1 --configsets Infra-EmbeddedPreBuild
2021/07/22 14:06:18.870794 [INFO] Finished executing the config set Infra-EmbeddedPreBuild.
2021/07/22 14:06:18.870834 [INFO] Executing instruction: StageApplication
2021/07/22 14:06:18.920260 [INFO] extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/
2021/07/22 14:06:18.920304 [INFO] Running command /bin/sh -c /usr/bin/unzip -q -o /opt/elasticbeanstalk/deployment/app_source_bundle -d /var/app/staging/
2021/07/22 14:06:19.216313 [INFO] finished extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/ successfully
2021/07/22 14:06:19.234264 [INFO] Executing instruction: RunAppDeployPreBuildHooks
2021/07/22 14:06:19.234297 [WARN] skipping hooks scripts under /opt/elasticbeanstalk/hooks/
2021/07/22 14:06:19.234312 [INFO] The dir .platform/hooks/prebuild/ does not exist in the application. Skipping this step...
2021/07/22 14:06:19.234333 [INFO] Executing instruction: stage ruby application
2021/07/22 14:06:19.234362 [INFO] stage ruby application ....
2021/07/22 14:06:19.234423 [INFO] Running command /bin/sh -c bundle config set --local deployment true
2021/07/22 14:06:19.425824 [INFO] Running command /bin/sh -c bundle install
2021/07/22 14:06:53.363740 [INFO] Starting...
2021/07/22 14:06:53.363804 [INFO] Starting EBPlatform-PlatformEngine
2021/07/22 14:06:53.363823 [INFO] reading event message file
2021/07/22 14:06:53.363922 [INFO] no eb envtier info file found, skip loading env tier info.
2021/07/22 14:06:53.363984 [INFO] Engine received EB command cfn-hup-exec
2021/07/22 14:06:54.038858 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-east-1:ACCOUNTID:stack/awseb-envID-stack/99999999-afaf-11ea-8b63 -r AWSEBAutoScalingGroup --region us-east-1
2021/07/22 14:06:56.446708 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:us-east-1:ACCOUNTID:stack/awseb-envID-stack/99999999-afaf-11ea-8b63 -r AWSEBBeanstalkMetadata --region us-east-1
2021/07/22 14:06:58.707885 [INFO] checking whether command app-deploy is applicable to this instance...
2021/07/22 14:06:58.707905 [INFO] this command is applicable to the instance, thus instance should execute command
2021/07/22 14:06:58.707910 [INFO] Engine command: (app-deploy)
2021/07/22 14:06:58.707918 [INFO] Downloading EB Application...
2021/07/22 14:06:58.707922 [INFO] Region: us-east-1
2021/07/22 14:06:58.707926 [INFO] envID: envID
2021/07/22 14:06:58.707931 [INFO] envBucket: elasticbeanstalk-us-east-1-ACCOUNTID
2021/07/22 14:06:58.707935 [INFO] Using manifest file name from command request
2021/07/22 14:06:58.707944 [INFO] Manifest name is : manifest_01234567891011
2021/07/22 14:06:58.707948 [INFO] Download app version manifest
2021/07/22 14:06:58.708070 [INFO] Downloading: bucket: elasticbeanstalk-us-east-1-ACCOUNTID, object: /resources/environments/envID/_runtime/versions/manifest_01234567891011
2021/07/22 14:06:58.829380 [INFO] Download successful170bytes downloaded
2021/07/22 14:06:58.829544 [INFO] Trying to read and parse version manifest...
2021/07/22 14:06:58.832252 [INFO] Downloading: bucket: elasticbeanstalk-us-east-1-ACCOUNTID, object: /resources/environments/envID/_runtime/_versions/myApp/code-pipeline-PIPELINENO
2021/07/22 14:07:00.124444 [INFO] Download successful14681002bytes downloaded
2021/07/22 14:07:00.124750 [INFO] Executing instruction: ElectLeader
2021/07/22 14:07:00.124760 [INFO] Running leader election for instance i-INSTANCEID...
2021/07/22 14:07:00.124765 [INFO] Calling the cfn-elect-cmd-leader to elect the command leader.
2021/07/22 14:07:00.124783 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-elect-cmd-leader --stack arn:aws:cloudformation:us-east-1:ACCOUNTID:stack/awseb-envID-stack/99999999-afaf-11ea-8b63 --command-name ElasticBeanstalkCommand-AWSEBAutoScalingGroup --invocation-id 03f7bdee-d863-4e8c-8b2b-9dc158be9f2c --listener-id i-INSTANCEID --region us-east-1
2021/07/22 14:07:02.487229 [INFO] Instance is Leader.
2021/07/22 14:07:02.487296 [INFO] Executing instruction: stopSqsd
2021/07/22 14:07:02.487304 [INFO] This is a web server environment instance, skip stop sqsd daemon ...
2021/07/22 14:07:02.487309 [INFO] Executing instruction: PreBuildEbExtension
2021/07/22 14:07:02.487314 [INFO] Starting executing the config set Infra-EmbeddedPreBuild.
2021/07/22 14:07:02.487338 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-init -s arn:aws:cloudformation:us-east-1:ACCOUNTID:stack/awseb-envID-stack/99999999-afaf-11ea-8b63 -r AWSEBAutoScalingGroup --region us-east-1 --configsets Infra-EmbeddedPreBuild
2021/07/22 14:07:04.860521 [INFO] Finished executing the config set Infra-EmbeddedPreBuild.
2021/07/22 14:07:04.860556 [INFO] Executing instruction: StageApplication
2021/07/22 14:07:06.309297 [ERROR] An error occurred during execution of command [app-deploy] - [StageApplication]. Stop running the command. Error: Recreating Dir failed with error: unlinkat /var/app/staging/vendor/bundle/ruby/2.7.0/gems: directory not empty 

更多线索:

2021/07/22 14:07:06.309461 [INFO] Executing cleanup logic
2021/07/22 14:07:06.309654 [INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,"events":[{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1626962826,"severity":"ERROR"}]}]}
2021/07/22 14:07:06.309949 [INFO] Platform Engine finished execution on command: app-deploy
2021/07/22 14:07:56.257526 [INFO] Fetching gem metadata from https://rubygems.org/
Fetching gem metadata from https://rubygems.org/........
Fetching https://github.com/GuillaumeWrobel/gridhook.git
Fetching https://github.com/waynehoover/s3_direct_upload.git
Fetching rake 13.0.3
Installing rake 13.0.3
Fetching concurrent-ruby 1.1.8
Fetching minitest 5.14.4
Installing minitest 5.14.4
Installing concurrent-ruby 1.1.8
Fetching zeitwerk 2.4.2
Installing zeitwerk 2.4.2
Fetching builder 3.2.4
Installing builder 3.2.4
Fetching erubi 1.10.0
Installing erubi 1.10.0
Fetching mini_portile2 2.5.1
Installing mini_portile2 2.5.1
Fetching racc 1.5.2
Fetching crass 1.0.6
Installing crass 1.0.6
Installing racc 1.5.2 with native extensions
Fetching rack 2.2.3
Installing rack 2.2.3
Fetching nio4r 2.5.7
Installing nio4r 2.5.7 with native extensions
Fetching websocket-extensions 0.1.5
Installing websocket-extensions 0.1.5
Fetching marcel 1.0.1
Installing marcel 1.0.1
Fetching mini_mime 1.0.3
Installing mini_mime 1.0.3
Fetching aws-eventstream 1.1.1
Installing aws-eventstream 1.1.1
Fetching aws-partitions 1.453.0
Installing aws-partitions 1.453.0
Fetching jmespath 1.4.0
Installing jmespath 1.4.0
Using bundler 2.2.17
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching thor 1.1.0
Installing thor 1.1.0
Fetching jsonapi-renderer 0.2.2
Installing jsonapi-renderer 0.2.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching amazon_pay 2.6.1
Installing amazon_pay 2.6.1
Fetching execjs 2.7.0
Installing execjs 2.7.0
Fetching faraday-excon 1.1.0
Installing faraday-excon 1.1.0
Fetching faraday-net_http 1.0.1
Installing faraday-net_http 1.0.1
Fetching faraday-net_http_persistent 1.1.0
Installing faraday-net_http_persistent 1.1.0
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.4
Installing ruby2_keywords 0.0.4
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching bcrypt 3.1.16
Installing bcrypt 3.1.16 with native extensions
Fetching msgpack 1.4.2
Installing msgpack 1.4.2 with native extensions
Fetching bootstrap-filestyle-rails 1.2.1
Installing bootstrap-filestyle-rails 1.2.1
Fetching ffi 1.15.0
Installing ffi 1.15.0 with native extensions
Fetching libxml-ruby 3.2.1
Installing libxml-ruby 3.2.1 with native extensions
Fetching browser 5.3.1
Installing browser 5.3.1
Fetching climate_control 0.2.0
Installing climate_control 0.2.0
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching coffee-script-source 1.12.2
Installing coffee-script-source 1.12.2
Fetching country-select 1.2.1
Installing country-select 1.2.1
Fetching dalli 2.7.11
Installing dalli 2.7.11
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching orm_adapter 0.5.0
Installing orm_adapter 0.5.0
Fetching hashie 4.1.0
Installing hashie 4.1.0
Fetching elasticsearch-rails 7.1.1
Installing elasticsearch-rails 7.1.1
Fetching excon 0.81.0
Installing excon 0.81.0
Fetching flutie 2.2.0
Installing flutie 2.2.0
Fetching formatador 0.2.5
Installing formatador 0.2.5
Fetching mime-types-data 3.2021.0225
Installing mime-types-data 3.2021.0225
Fetching ipaddress 0.8.3
Installing ipaddress 0.8.3
Fetching foundation_emails 2.2.1.0
Installing foundation_emails 2.2.1.0
Fetching geocoder 1.6.7
Installing geocoder 1.6.7
Fetching jwt 2.2.3
Installing jwt 2.2.3
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching os 1.0.1
Installing os 1.0.1
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching trailblazer-option 0.1.1
Installing trailblazer-option 0.1.1
Fetching uber 0.1.0
Fetching retriable 3.1.2
Installing uber 0.1.0
Installing retriable 3.1.2
Fetching rexml 3.2.5
Fetching webrick 1.7.0
Installing rexml 3.2.5
Installing webrick 1.7.0
Fetching sexp_processor 4.15.2
Installing sexp_processor 4.15.2
Fetching temple 0.8.2
Installing temple 0.8.2
Fetching tilt 2.0.10
Installing tilt 2.0.10
Fetching honeybadger 4.8.0
Fetching htmlentities 4.3.4
Installing htmlentities 4.3.4
Installing honeybadger 4.8.0
Fetching jquery-datetimepicker-rails 2.4.1.0
Installing jquery-datetimepicker-rails 2.4.1.0
Fetching rb-fsevent 0.10.4
Installing rb-fsevent 0.10.4
Fetching json 1.8.6
Fetching kaminari-core 1.2.1
Installing json 1.8.6 with native extensions
Installing kaminari-core 1.2.1
Fetching memcachier 0.0.2
Installing memcachier 0.0.2
Fetching newrelic_rpm 7.0.0
Installing newrelic_rpm 7.0.0
Fetching pg 1.2.3
Installing pg 1.2.3 with native extensions
Fetching puma 3.12.6
Installing puma 3.12.6 with native extensions
Fetching rails_serve_static_assets 0.0.5
Installing rails_serve_static_assets 0.0.5
Fetching rails_stdout_logging 0.0.5
Installing rails_stdout_logging 0.0.5
Fetching rdoc 4.3.0
Installing rdoc 4.3.0
Fetching ruby-ole 1.2.12.2
Installing ruby-ole 1.2.12.2
Fetching rubyzip 2.3.0
Installing rubyzip 2.3.0
Fetching slack-notifier 2.4.0
Installing slack-notifier 2.4.0
Fetching turbolinks-source 5.2.0
Installing turbolinks-source 5.2.0
Fetching sitemap_generator 6.1.2
Installing sitemap_generator 6.1.2
Fetching i18n 1.8.10
Installing i18n 1.8.10
Fetching tzinfo 2.0.4
Installing tzinfo 2.0.4
Fetching rack-test 1.1.0
Installing rack-test 1.1.0
Fetching sprockets 3.7.2
Installing sprockets 3.7.2
Fetching warden 1.2.9
Installing warden 1.2.9
Fetching font_assets 0.1.14
Installing font_assets 0.1.14
Fetching rack-cors 1.1.1
Installing rack-cors 1.1.1
Fetching rack-maintenance 2.1.0
Installing rack-maintenance 2.1.0
Fetching nokogiri 1.11.3 (x86_64-linux)
Installing nokogiri 1.11.3 (x86_64-linux)
Fetching websocket-driver 0.7.3
Installing websocket-driver 0.7.3 with native extensions
Fetching mail 2.7.1
Installing mail 2.7.1
Fetching aws-sigv4 1.2.3
Installing aws-sigv4 1.2.3
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching autoprefixer-rails 10.2.4.0
Installing autoprefixer-rails 10.2.4.0
Fetching uglifier 4.2.0
Installing uglifier 4.2.0
Fetching faraday 1.4.1
Installing faraday 1.4.1
Fetching elasticsearch-api 7.12.0
Installing elasticsearch-api 7.12.0
Fetching bootsnap 1.4.9
Installing bootsnap 1.4.9 with native extensions
Fetching braintree 3.4.0
Installing braintree 3.4.0
Fetching terrapin 0.6.0
Installing terrapin 0.6.0
Fetching pry 0.14.1
Installing pry 0.14.1
Fetching coffee-script 2.4.1
Installing coffee-script 2.4.1
Fetching mime-types 3.3.1
Installing mime-types 3.3.1

2021/07/22 14:07:56.257600 [ERROR] An error occurred during execution of command [self-startup] - [stage ruby application]. Stop running the command. Error: install dependencies in Gemfile failed with error Command /bin/sh -c bundle install failed with error exit status 1. Stderr: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.

回溯

Errno::ENOENT: No such file or directory @ rb_sysopen - /var/app/staging/vendor/bundle/ruby/2.7.0/cache/memoist-0.16.2.gem
  /opt/rubies/ruby-2.7.3/lib/ruby/2.7.0/fileutils.rb:1414:in `initialize'
  /opt/rubies/ruby-2.7.3/lib/ruby/2.7.0/fileutils.rb:1414:in `open'
  /opt/rubies/ruby-2.7.3/lib/ruby/2.7.0/fileutils.rb:1414:in `copy_file'
  /opt/rubies/ruby-2.7.3/lib/ruby/2.7.0/fileutils.rb:511:in `copy_file'
  /opt/rubies/ruby-2.7.3/lib/ruby/2.7.0/fileutils.rb:430:in `block in cp'
  /opt/rubies/ruby-2.7.3/lib/ruby/2.7.0/fileutils.rb:1589:in `block in fu_each_src_dest'
  /opt/rubies/ruby-2.7.3/lib/ruby/2.7.0/fileutils.rb:1605:in `fu_each_src_dest0'
  /opt/rubies/ruby-2.7.3/lib/ruby/2.7.0/fileutils.rb:1587:in `fu_each_src_dest'
  /opt/rubies/ruby-2.7.3/lib/ruby/2.7.0/fileutils.rb:429:in `cp'
  /opt/rubies/ruby-2.7.3/lib/ruby/site_ruby/2.7.0/rubygems/package.rb:207:in `copy_to'
  /opt/rubies/ruby-2.7.3/lib/ruby/site_ruby/2.7.0/rubygems/installer.rb:932:in `write_cache_file'
  /opt/rubies/ruby-2.7.3/lib/ruby/site_ruby/2.7.0/bundler/rubygems_gem_installer.rb:34:in `install'
  /opt/rubies/ruby-2.7.3/lib/ruby/site_ruby/2.7.0/bundler/source/rubygems.rb:176:in `install'
  /opt/rubies/ruby-2.7.3/lib/ruby/site_ruby/2.7.0/bundler/installer/gem_installer.rb:67:in `install'
  /opt/rubies/ruby-2.7.3/lib/ruby/site_ruby/2.7.0/bundler/installer/gem_installer.rb:18:in `install_from_spec'
  /opt/rubies/ruby-2.7.3/lib/ruby/site_ruby/2.7.0/bundler/installer/parallel_installer.rb:186:in `do_install'
  /opt/rubies/ruby-2.7.3/lib/ruby/site_ruby/2.7.0/bundler/installer/parallel_installer.rb:177:in `block in worker_pool'
  /opt/rubies/ruby-2.7.3/lib/ruby/site_ruby/2.7.0/bundler/worker.rb:62:in `apply_func'
  /opt/rubies/ruby-2.7.3/lib/ruby/site_ruby/2.7.0/bundler/worker.rb:57:in `block in process_queue'
  /opt/rubies/ruby-2.7.3/lib/ruby/site_ruby/2.7.0/bundler/worker.rb:54:in `loop'
  /opt/rubies/ruby-2.7.3/lib/ruby/site_ruby/2.7.0/bundler/worker.rb:54:in `process_queue'
  /opt/rubies/ruby-2.7.3/lib/ruby/site_ruby/2.7.0/bundler/worker.rb:88:in `block (2 levels) in create_threads'

环境

Bundler       2.2.17
  Platforms   ruby, x86_64-linux
Ruby          2.7.3p183 (2021-04-05 revision 6847ee089d7655b2a0eea4fee3133aeacd4cc7cc) [x86_64-linux]
  Full Path   /opt/rubies/ruby-2.7.3/bin/ruby
  Config Dir  /opt/rubies/ruby-2.7.3/etc
RubyGems      3.2.17
  Gem Home    /var/app/staging/vendor/bundle/ruby/2.7.0
  Gem Path    /var/app/staging/vendor/bundle/ruby/2.7.0
  User Home   /root
  User Path   /root/.local/share/gem/ruby/2.7.0
  Bin Dir     /var/app/staging/vendor/bundle/ruby/2.7.0/bin
OpenSSL       
  Compiled    OpenSSL 1.0.2k  26 Jan 2017
  Loaded      OpenSSL 1.0.2k-fips  26 Jan 2017
  Cert File   /etc/pki/tls/cert.pem
  Cert Dir    /etc/pki/tls/certs
Tools         
  Git         2.23.4
  RVM         not installed
  rbenv       rbenv 1.1.2
  chruby      not installed

Bundler 构建元数据

Built At          2021-05-05
Git SHA           69xwq9f45w
Released Version  true

捆绑程序设置

deployment
  Set for your local app (/var/app/staging/.bundle/config): true
path
  Set for your local app (/var/app/staging/.bundle/config): "vendor/bundle"
without
  Set for your local app (/var/app/staging/.bundle/config): [:test, :development]
  Set via BUNDLE_WITHOUT: [:test, :development]

Rubygems@github 上的问题链接:https://github.com/rubygems/rubygems/issues/4777

[更新 07/29]

通过 .ebextensionsProcfile 以及通过 .platform 服务应用一些配置后,我现在得到:

2021/07/29 13:04:20.356839 [ERROR] An error occurred during execution of command [app-deploy] - [rake tasks]. Stop running the command. Error: running rake task db:migrate failed with error command bundle exec rake db:migrate failed with error Command /bin/su webapp -c bundle exec rake db:migrate failed with error exit status 1. Stderr:/var/app/staging/vendor/bundle/ruby/2.7.0/gems/json-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
/var/app/staging/vendor/bundle/ruby/2.7.0/gems/json-1.8.6/lib/json/common.rb:155: warning: Using the last argument as keyword parameters is deprecated
rake aborted!
ActiveRecord::ConnectionNotEstablished: server common name does not match host name

1 个答案:

答案 0 :(得分:0)

[UPDATE 02-Aug]:我尝试终止 EC2 实例并将应用程序部署到新的 EC2 实例,但看起来我又回到了原来的问题。

2021/08/02 07:11:47.798233 [INFO] Running command /bin/sh -c bundle config set --local deployment true
2021/08/02 07:11:48.175211 [INFO] Running command /bin/sh -c bundle install
2021/08/02 07:11:53.186604 [INFO] Fetching gem metadata from https://rubygems.org/
Fetching gem metadata from https://rubygems.org/........
Fetching https://github.com/GuillaumeWrobel/gridhook.git
2021/08/02 07:11:53.186747 [ERROR] An error occurred during execution of command [self-startup] - [stage ruby application]. Stop running the command. Error: install dependencies in Gemfile failed with error Command /bin/sh -c bundle install failed with error exit status 1. Stderr: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.
Retrying `git clone https://github.com/GuillaumeWrobel/gridhook.git /var/app/staging/vendor/bundle/ruby/2.7.0/cache/bundler/git/gridhook-a3491bf2e1ea256c1f3cb23bff576ec00c3e6d0b --bare --no-hardlinks --quiet` at /var/app/staging due to error (2/4): Errno::ENOENT No such file or directory - git
Retrying `git clone https://github.com/GuillaumeWrobel/gridhook.git /var/app/staging/vendor/bundle/ruby/2.7.0/cache/bundler/git/gridhook-a3491bf2e1ea256c1f3cb23bff576ec00c3e6d0b --bare --no-hardlinks --quiet` at /var/app/staging due to error (3/4): Errno::ENOENT No such file or directory - git
Retrying `git clone https://github.com/GuillaumeWrobel/gridhook.git /var/app/staging/vendor/bundle/ruby/2.7.0/cache/bundler/git/gridhook-a3491bf2e1ea256c1f3cb23bff576ec00c3e6d0b --bare --no-hardlinks --quiet` at /var/app/staging due to error (4/4): Errno::ENOENT No such file or directory - git

错误报告

问题

  • 你做了什么?

    我运行了命令 /opt/elasticbeanstalk/.rbenv/versions/2.7.4/bin/bundle install

  • 你预计会发生什么?

    我预计 Bundler 会...

  • 发生了什么?

    相反,发生的事情是......

  • 您是否尝试过在我们的问题跟踪器、堆栈溢出或谷歌中针对类似问题发布的任何解决方案?

    我试过了...

  • 您是否阅读过我们的问题文档,https://github.com/rubygems/rubygems/blob/master/bundler/doc/contributing/ISSUES.md?

    ...

回溯

Errno::ENOENT: No such file or directory - git
  /opt/rubies/ruby-2.7.4/lib/ruby/2.7.0/open3.rb:213:in `spawn'
  /opt/rubies/ruby-2.7.4/lib/ruby/2.7.0/open3.rb:213:in `popen_run'
  /opt/rubies/ruby-2.7.4/lib/ruby/2.7.0/open3.rb:101:in `popen3'
  /opt/rubies/ruby-2.7.4/lib/ruby/2.7.0/open3.rb:281:in `capture3'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/source/git/git_proxy.rb:234:in `capture_and_filter_stderr'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/source/git/git_proxy.rb:170:in `block in git'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/shared_helpers.rb:70:in `with_clean_git_env'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/source/git/git_proxy.rb:169:in `git'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/source/git/git_proxy.rb:162:in `block in git_retry'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/retry.rb:40:in `run'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/retry.rb:30:in `attempt'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/source/git/git_proxy.rb:161:in `git_retry'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/source/git/git_proxy.rb:101:in `checkout'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/source/git.rb:310:in `fetch'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/source/git.rb:164:in `specs'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/lazy_specification.rb:72:in `__materialize__'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/spec_set.rb:88:in `block in materialize'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/spec_set.rb:86:in `map!'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/spec_set.rb:86:in `materialize'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/definition.rb:190:in `specs'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/installer.rb:247:in `ensure_specs_are_compatible!'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/installer.rb:84:in `block in run'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/process_lock.rb:12:in `block in lock'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/process_lock.rb:9:in `open'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/process_lock.rb:9:in `lock'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/installer.rb:72:in `run'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/installer.rb:24:in `install'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/cli/install.rb:60:in `run'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:259:in `block in install'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/settings.rb:131:in `temporary'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:258:in `install'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:30:in `dispatch'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:24:in `start'
  /opt/rubies/ruby-2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.22/exe/bundle:49:in `block in <top (required)>'
  /opt/rubies/ruby-2.7.4/lib/ruby/site_ruby/2.7.0/bundler/friendly_errors.rb:128:in `with_friendly_errors'
  /opt/rubies/ruby-2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.2.22/exe/bundle:37:in `<top (required)>'
  /opt/elasticbeanstalk/.rbenv/versions/2.7.4/bin/bundle:23:in `load'
  /opt/elasticbeanstalk/.rbenv/versions/2.7.4/bin/bundle:23:in `<main>'

环境

Bundler       2.2.22
  Platforms   ruby, x86_64-linux
Ruby          2.7.4p191 (2021-07-07 revision a21a3b7d23704a01d34bd79d09dc37897e00922a) [x86_64-linux]
  Full Path   /opt/rubies/ruby-2.7.4/bin/ruby
  Config Dir  /opt/rubies/ruby-2.7.4/etc
RubyGems      3.2.22
  Gem Home    /var/app/staging/vendor/bundle/ruby/2.7.0
  Gem Path    /var/app/staging/vendor/bundle/ruby/2.7.0
  User Home   /root
  User Path   /root/.local/share/gem/ruby/2.7.0
  Bin Dir     /var/app/staging/vendor/bundle/ruby/2.7.0/bin
OpenSSL       
  Compiled    OpenSSL 1.0.2k  26 Jan 2017
  Loaded      OpenSSL 1.0.2k-fips  26 Jan 2017
  Cert File   /etc/pki/tls/cert.pem
  Cert Dir    /etc/pki/tls/certs
Tools         
  Git         not installed
  RVM         not installed
  rbenv       rbenv 1.1.2
  chruby      not installed

Bundler 构建元数据

Built At          2021-07-06
Git SHA           0bdd3e8e71
Released Version  true

捆绑程序设置

deployment
  Set for your local app (/var/app/staging/.bundle/config): true
path
  Set for your local app (/var/app/staging/.bundle/config): "vendor/bundle"
without
  Set for your local app (/var/app/staging/.bundle/config): [:test, :development]
  Set via BUNDLE_WITHOUT: [:test, :development]

Gemfile

Gemfile

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.7.4'

gem 'actionpack-action_caching', '~> 1.2', '>= 1.2.2'
gem 'active_elastic_job'
gem 'active_model_serializers', '~> 0.10.10'
gem 'amazon_pay'
gem 'apipie-rails'
gem 'audited', '~> 4.9'
gem 'avatax'
gem 'aws-sdk-s3', '~> 1'
gem 'bootsnap', '~> 1.4.2'
gem 'bootstrap-filestyle-rails'
gem 'bootstrap-sass'
gem 'braintree'
gem 'browser'
gem 'chartjs-ror'
gem 'country-select'
gem 'dalli'
gem 'devise'
gem 'dropzonejs-rails'
gem 'elasticsearch-model', '~> 7.1'
gem 'elasticsearch-persistence', '~> 7.1'
gem 'elasticsearch-rails', '~> 7.1'
gem 'faraday_middleware'
gem 'flutie'
gem 'fog-aws'
gem 'font_assets'
gem 'friendly_id'
gem 'geocoder'
gem 'google-apis-analyticsreporting_v4'
gem 'gridhook', git: 'https://github.com/GuillaumeWrobel/gridhook.git', branch: 'master'
gem 'hairtrigger'
gem 'haml', '~> 5.1', '>= 5.1.2'
gem 'inky-rb', require: 'inky'
gem 'jbuilder', '~> 2.10'
gem 'jhtmlarea'
gem 'jquery-datetimepicker-rails'
gem 'jquery-rails'
gem 'jquery-ui-rails', '5.0.3'
gem 'kaminari'
gem 'masonry-rails'
gem 'memcachier'
gem 'newrelic_rpm'
gem 'paperclip', '~> 6.0.0'
gem 'paperclip-compression'
gem 'pg'
gem 'pghero'
gem 'pg_search'
gem 'premailer-rails' # Stylesheet inlining for email
gem 'pry-rails'
gem 'puma', '~> 3.11'
gem 'puma_worker_killer'
gem 'rack', '~> 2.1', '>= 2.1.2'
gem 'rack-cors', require: 'rack/cors'
gem 'rack-maintenance'
gem 'rack-tracker'
gem 'rails', '~> 6.1', '>= 6.1.3.1'
gem 'rails-healthcheck'
gem 'recaptcha', require: 'recaptcha/rails'
gem 'ruby_parser', '~> 3.11'
gem 'rubyzip', '>= 1.0.0'
gem 's3_direct_upload', git: 'https://github.com/waynehoover/s3_direct_upload.git', branch: 'master'
gem 'sass-rails', '~> 5.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'sendgrid'
gem 'simple_form'
gem 'sitemap_generator'
gem "slack-notifier"
gem 'spreadsheet'
gem 'turbolinks', '~> 5.2.0'
gem 'uglifier', '>= 1.3.0'
gem 'view_component', require: 'view_component/engine'
gem 'wicked_pdf', '~> 2.0', '>= 2.0.1'
gem 'wkhtmltopdf-binary', '0.12.6'

group :develop, :stage, :production do
  gem 'honeybadger'
  gem 'rails_12factor'
end

group :development, :test do
  gem 'awesome_print'
  gem 'factory_bot_rails'
  gem 'faker'
  gem 'letter_opener_web'
  gem 'listen'
  gem 'mocha'
  gem 'rspec-rails', '~> 4.0.0.beta'
  gem 'rubocop', require: false
  gem 'rubocop-rails', require: false
  gem 'rubocop-rspec', require: false
end

group :development do
  gem 'httplog'
end

group :test do
  gem 'capybara'
  gem 'selenium-webdriver'
  gem 'shoulda-matchers'
  gem 'rails-controller-testing'
end

Gemfile.lock

GIT
  remote: https://github.com/GuillaumeWrobel/gridhook.git
  revision: 3adac666507a2878c39353c2a95a3ed1567ddbc1
  branch: master
  specs:
    gridhook (0.2.1)
      rails (>= 3.1.0)

GIT
  remote: https://github.com/waynehoover/s3_direct_upload.git
  revision: 6f6decc75fdf89888d7f729fc89f78e90d91cece
  branch: master
  specs:
    s3_direct_upload (0.1.7)
      coffee-rails (>= 3.1)
      jquery-fileupload-rails (~> 0.4.1)
      rails (>= 3.1)
      sass-rails (>= 3.1)

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (6.1.3.2)
      actionpack (= 6.1.3.2)
      activesupport (= 6.1.3.2)
      nio4r (~> 2.0)
      websocket-driver (>= 0.6.1)
    actionmailbox (6.1.3.2)
      actionpack (= 6.1.3.2)
      activejob (= 6.1.3.2)
      activerecord (= 6.1.3.2)
      activestorage (= 6.1.3.2)
      activesupport (= 6.1.3.2)
      mail (>= 2.7.1)
    actionmailer (6.1.3.2)
      actionpack (= 6.1.3.2)
      actionview (= 6.1.3.2)
      activejob (= 6.1.3.2)
      activesupport (= 6.1.3.2)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionpack (6.1.3.2)
      actionview (= 6.1.3.2)
      activesupport (= 6.1.3.2)
      rack (~> 2.0, >= 2.0.9)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.2.0)
    actionpack-action_caching (1.2.2)
      actionpack (>= 4.0.0)
    actiontext (6.1.3.2)
      actionpack (= 6.1.3.2)
      activerecord (= 6.1.3.2)
      activestorage (= 6.1.3.2)
      activesupport (= 6.1.3.2)
      nokogiri (>= 1.8.5)
    actionview (6.1.3.2)
      activesupport (= 6.1.3.2)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.1, >= 1.2.0)
    active_elastic_job (3.0.0)
      aws-sdk-sqs (~> 1)
      rails (>= 5.0, < 7)
    active_model_serializers (0.10.12)
      actionpack (>= 4.1, < 6.2)
      activemodel (>= 4.1, < 6.2)
      case_transform (>= 0.2)
      jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
    activejob (6.1.3.2)
      activesupport (= 6.1.3.2)
      globalid (>= 0.3.6)
    activemodel (6.1.3.2)
      activesupport (= 6.1.3.2)
    activerecord (6.1.3.2)
      activemodel (= 6.1.3.2)
      activesupport (= 6.1.3.2)
    activestorage (6.1.3.2)
      actionpack (= 6.1.3.2)
      activejob (= 6.1.3.2)
      activerecord (= 6.1.3.2)
      activesupport (= 6.1.3.2)
      marcel (~> 1.0.0)
      mini_mime (~> 1.0.2)
    activesupport (6.1.3.2)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 1.6, < 2)
      minitest (>= 5.1)
      tzinfo (~> 2.0)
      zeitwerk (~> 2.3)
    addressable (2.7.0)
      public_suffix (>= 2.0.2, < 5.0)
    amazon_pay (2.6.1)
    apipie-rails (0.5.18)
      rails (>= 4.1)
    ast (2.4.2)
    audited (4.10.0)
      activerecord (>= 4.2, < 6.2)
    autoprefixer-rails (10.2.4.0)
      execjs
    avatax (21.3.1)
      faraday (>= 0.10)
      faraday_middleware (>= 0.10)
      multi_json (>= 1.0.3)
    awesome_print (1.9.2)
    aws-eventstream (1.1.1)
    aws-partitions (1.453.0)
    aws-sdk-core (3.114.0)
      aws-eventstream (~> 1, >= 1.0.2)
      aws-partitions (~> 1, >= 1.239.0)
      aws-sigv4 (~> 1.1)
      jmespath (~> 1.0)
    aws-sdk-kms (1.43.0)
      aws-sdk-core (~> 3, >= 3.112.0)
      aws-sigv4 (~> 1.1)
    aws-sdk-s3 (1.94.1)
      aws-sdk-core (~> 3, >= 3.112.0)
      aws-sdk-kms (~> 1)
      aws-sigv4 (~> 1.1)
    aws-sdk-sqs (1.38.0)
      aws-sdk-core (~> 3, >= 3.112.0)
      aws-sigv4 (~> 1.1)
    aws-sigv4 (1.2.3)
      aws-eventstream (~> 1, >= 1.0.2)
    bcrypt (3.1.16)
    bootsnap (1.4.9)
      msgpack (~> 1.0)
    bootstrap-filestyle-rails (1.2.1)
    bootstrap-sass (3.4.1)
      autoprefixer-rails (>= 5.2.1)
      sassc (>= 2.0.0)
    braintree (3.4.0)
      builder (>= 3.2.4)
      libxml-ruby (>= 3.2.0)
    browser (5.3.1)
    builder (3.2.4)
    capybara (3.35.3)
      addressable
      mini_mime (>= 0.1.3)
      nokogiri (~> 1.8)
      rack (>= 1.6.0)
      rack-test (>= 0.6.3)
      regexp_parser (>= 1.5, < 3.0)
      xpath (~> 3.2)
    case_transform (0.2)
      activesupport
    chartjs-ror (3.6.4)
      rails (>= 3.1)
    childprocess (3.0.0)
    climate_control (0.2.0)
    coderay (1.1.3)
    coffee-rails (5.0.0)
      coffee-script (>= 2.2.0)
      railties (>= 5.2.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.12.2)
    concurrent-ruby (1.1.8)
    country-select (1.2.1)
    crass (1.0.6)
    css_parser (1.9.0)
      addressable
    dalli (2.7.11)
    declarative (0.0.20)
    devise (4.8.0)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 4.1.0)
      responders
      warden (~> 1.2.3)
    diff-lcs (1.4.4)
    dropzonejs-rails (0.8.5)
      rails (> 3.1)
    elasticsearch (7.12.0)
      elasticsearch-api (= 7.12.0)
      elasticsearch-transport (= 7.12.0)
    elasticsearch-api (7.12.0)
      multi_json
    elasticsearch-model (7.1.1)
      activesupport (> 3)
      elasticsearch (> 1)
      hashie
    elasticsearch-persistence (7.1.1)
      activemodel (> 4)
      activesupport (> 4)
      elasticsearch (~> 7)
      elasticsearch-model (= 7.1.1)
      hashie
    elasticsearch-rails (7.1.1)
    elasticsearch-transport (7.12.0)
      faraday (~> 1)
      multi_json
    erubi (1.10.0)
    excon (0.81.0)
    execjs (2.7.0)
    factory_bot (6.1.0)
      activesupport (>= 5.0.0)
    factory_bot_rails (6.1.0)
      factory_bot (~> 6.1.0)
      railties (>= 5.0.0)
    faker (2.17.0)
      i18n (>= 1.6, < 2)
    faraday (1.4.1)
      faraday-excon (~> 1.1)
      faraday-net_http (~> 1.0)
      faraday-net_http_persistent (~> 1.1)
      multipart-post (>= 1.2, < 3)
      ruby2_keywords (>= 0.0.4)
    faraday-excon (1.1.0)
    faraday-net_http (1.0.1)
    faraday-net_http_persistent (1.1.0)
    faraday_middleware (1.0.0)
      faraday (~> 1.0)
    ffi (1.15.0)
    flutie (2.2.0)
    fog-aws (3.10.0)
      fog-core (~> 2.1)
      fog-json (~> 1.1)
      fog-xml (~> 0.1)
      ipaddress (~> 0.8)
    fog-core (2.2.4)
      builder
      excon (~> 0.71)
      formatador (~> 0.2)
      mime-types
    fog-json (1.2.0)
      fog-core
      multi_json (~> 1.10)
    fog-xml (0.1.3)
      fog-core
      nokogiri (>= 1.5.11, < 2.0.0)
    font_assets (0.1.14)
      rack
    formatador (0.2.5)
    foundation_emails (2.2.1.0)
    friendly_id (5.4.2)
      activerecord (>= 4.0.0)
    geocoder (1.6.7)
    get_process_mem (0.2.7)
      ffi (~> 1.0)
    globalid (0.4.2)
      activesupport (>= 4.2.0)
    google-apis-analyticsreporting_v4 (0.2.0)
      google-apis-core (~> 0.1)
    google-apis-core (0.3.0)
      addressable (~> 2.5, >= 2.5.1)
      googleauth (~> 0.14)
      httpclient (>= 2.8.1, < 3.0)
      mini_mime (~> 1.0)
      representable (~> 3.0)
      retriable (>= 2.0, < 4.0)
      rexml
      signet (~> 0.14)
      webrick
    googleauth (0.16.2)
      faraday (>= 0.17.3, < 2.0)
      jwt (>= 1.4, < 3.0)
      memoist (~> 0.16)
      multi_json (~> 1.11)
      os (>= 0.9, < 2.0)
      signet (~> 0.14)
    hairtrigger (0.2.24)
      activerecord (>= 5.0, < 7)
      ruby2ruby (~> 2.4)
      ruby_parser (~> 3.10)
    haml (5.2.1)
      temple (>= 0.8.0)
      tilt
    hashie (4.1.0)
    honeybadger (4.8.0)
    htmlentities (4.3.4)
    httpclient (2.8.3)
    httplog (1.4.3)
      rack (>= 1.0)
      rainbow (>= 2.0.0)
    i18n (1.8.10)
      concurrent-ruby (~> 1.0)
    inky-rb (1.3.8.0)
      foundation_emails (~> 2)
      nokogiri
    ipaddress (0.8.3)
    jbuilder (2.11.2)
      activesupport (>= 5.0.0)
    jhtmlarea (0.1.0)
      jquery-rails
    jmespath (1.4.0)
    jquery-datetimepicker-rails (2.4.1.0)
    jquery-fileupload-rails (0.4.7)
      actionpack (>= 3.1)
      railties (>= 3.1)
      sass (>= 3.2)
    jquery-rails (4.4.0)
      rails-dom-testing (>= 1, < 3)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    jquery-ui-rails (5.0.3)
      railties (>= 3.2.16)
    json (1.8.6)
    jsonapi-renderer (0.2.2)
    jwt (2.2.3)
    kaminari (1.2.1)
      activesupport (>= 4.1.0)
      kaminari-actionview (= 1.2.1)
      kaminari-activerecord (= 1.2.1)
      kaminari-core (= 1.2.1)
    kaminari-actionview (1.2.1)
      actionview
      kaminari-core (= 1.2.1)
    kaminari-activerecord (1.2.1)
      activerecord
      kaminari-core (= 1.2.1)
    kaminari-core (1.2.1)
    launchy (2.5.0)
      addressable (~> 2.7)
    letter_opener (1.7.0)
      launchy (~> 2.2)
    letter_opener_web (1.4.0)
      actionmailer (>= 3.2)
      letter_opener (~> 1.0)
      railties (>= 3.2)
    libxml-ruby (3.2.1)
    listen (3.5.1)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    loofah (2.9.1)
      crass (~> 1.0.2)
      nokogiri (>= 1.5.9)
    mail (2.7.1)
      mini_mime (>= 0.1.1)
    marcel (1.0.1)
    masonry-rails (0.2.4)
      railties
    memcachier (0.0.2)
    memoist (0.16.2)
    method_source (1.0.0)
    mime-types (3.3.1)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2021.0225)
    mimemagic (0.3.10)
      nokogiri (~> 1)
      rake
    mini_mime (1.0.3)
    mini_portile2 (2.5.1)
    minitest (5.14.4)
    mocha (1.12.0)
    msgpack (1.4.2)
    multi_json (1.15.0)
    multipart-post (2.1.1)
    newrelic_rpm (7.0.0)
    nio4r (2.5.7)
    nokogiri (1.11.3)
      mini_portile2 (~> 2.5.0)
      racc (~> 1.4)
    orm_adapter (0.5.0)
    os (1.0.1)
    paperclip (6.0.0)
      activemodel (>= 4.2.0)
      activesupport (>= 4.2.0)
      mime-types
      mimemagic (~> 0.3.0)
      terrapin (~> 0.6.0)
    paperclip-compression (1.1.1)
      os (~> 1.0.0)
      paperclip (>= 5.2.1)
    parallel (1.20.1)
    parser (3.0.1.1)
      ast (~> 2.4.1)
    pg (1.2.3)
    pg_search (2.3.5)
      activerecord (>= 5.2)
      activesupport (>= 5.2)
    pghero (2.8.1)
      activerecord (>= 5)
    premailer (1.14.3)
      addressable
      css_parser (>= 1.6.0)
      htmlentities (>= 4.0.0)
    premailer-rails (1.11.1)
      actionmailer (>= 3)
      premailer (~> 1.7, >= 1.7.9)
    pry (0.14.1)
      coderay (~> 1.1)
      method_source (~> 1.0)
    pry-rails (0.3.9)
      pry (>= 0.10.4)
    public_suffix (4.0.6)
    puma (3.12.6)
    puma_worker_killer (0.3.1)
      get_process_mem (~> 0.2)
      puma (>= 2.7)
    racc (1.5.2)
    rack (2.2.3)
    rack-cors (1.1.1)
      rack (>= 2.0.0)
    rack-maintenance (2.1.0)
      rack (>= 1.0)
    rack-test (1.1.0)
      rack (>= 1.0, < 3)
    rack-tracker (1.12.1)
      activesupport (>= 3.0)
      rack (>= 1.4)
      tilt (>= 1.4)
    rails (6.1.3.2)
      actioncable (= 6.1.3.2)
      actionmailbox (= 6.1.3.2)
      actionmailer (= 6.1.3.2)
      actionpack (= 6.1.3.2)
      actiontext (= 6.1.3.2)
      actionview (= 6.1.3.2)
      activejob (= 6.1.3.2)
      activemodel (= 6.1.3.2)
      activerecord (= 6.1.3.2)
      activestorage (= 6.1.3.2)
      activesupport (= 6.1.3.2)
      bundler (>= 1.15.0)
      railties (= 6.1.3.2)
      sprockets-rails (>= 2.0.0)
    rails-controller-testing (1.0.5)
      actionpack (>= 5.0.1.rc1)
      actionview (>= 5.0.1.rc1)
      activesupport (>= 5.0.1.rc1)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-healthcheck (1.3.0)
      actionpack
      railties
    rails-html-sanitizer (1.3.0)
      loofah (~> 2.3)
    rails_12factor (0.0.3)
      rails_serve_static_assets
      rails_stdout_logging
    rails_serve_static_assets (0.0.5)
    rails_stdout_logging (0.0.5)
    railties (6.1.3.2)
      actionpack (= 6.1.3.2)
      activesupport (= 6.1.3.2)
      method_source
      rake (>= 0.8.7)
      thor (~> 1.0)
    rainbow (3.0.0)
    rake (13.0.3)
    rb-fsevent (0.10.4)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    rdoc (4.3.0)
    recaptcha (5.7.0)
      json
    regexp_parser (2.1.1)
    representable (3.1.1)
      declarative (< 0.1.0)
      trailblazer-option (>= 0.1.1, < 0.2.0)
      uber (< 0.2.0)
    responders (3.0.1)
      actionpack (>= 5.0)
      railties (>= 5.0)
    retriable (3.1.2)
    rexml (3.2.5)
    rspec-core (3.10.1)
      rspec-support (~> 3.10.0)
    rspec-expectations (3.10.1)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.10.0)
    rspec-mocks (3.10.2)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.10.0)
    rspec-rails (4.0.2)
      actionpack (>= 4.2)
      activesupport (>= 4.2)
      railties (>= 4.2)
      rspec-core (~> 3.10)
      rspec-expectations (~> 3.10)
      rspec-mocks (~> 3.10)
      rspec-support (~> 3.10)
    rspec-support (3.10.2)
    rubocop (1.14.0)
      parallel (~> 1.10)
      parser (>= 3.0.0.0)
      rainbow (>= 2.2.2, < 4.0)
      regexp_parser (>= 1.8, < 3.0)
      rexml
      rubocop-ast (>= 1.5.0, < 2.0)
      ruby-progressbar (~> 1.7)
      unicode-display_width (>= 1.4.0, < 3.0)
    rubocop-ast (1.5.0)
      parser (>= 3.0.1.1)
    rubocop-rails (2.9.1)
      activesupport (>= 4.2.0)
      rack (>= 1.1)
      rubocop (>= 0.90.0, < 2.0)
    rubocop-rspec (2.3.0)
      rubocop (~> 1.0)
      rubocop-ast (>= 1.1.0)
    ruby-ole (1.2.12.2)
    ruby-progressbar (1.11.0)
    ruby2_keywords (0.0.4)
    ruby2ruby (2.4.4)
      ruby_parser (~> 3.1)
      sexp_processor (~> 4.6)
    ruby_parser (3.15.1)
      sexp_processor (~> 4.9)
    rubyzip (2.3.0)
    sass (3.7.4)
      sass-listen (~> 4.0.0)
    sass-listen (4.0.0)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
    sass-rails (5.1.0)
      railties (>= 5.2.0)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    sassc (2.4.0)
      ffi (~> 1.9)
    sdoc (0.4.2)
      json (~> 1.7, >= 1.7.7)
      rdoc (~> 4.0)
    selenium-webdriver (3.142.7)
      childprocess (>= 0.5, < 4.0)
      rubyzip (>= 1.2.2)
    sendgrid (1.2.4)
      json
    sexp_processor (4.15.2)
    shoulda-matchers (4.5.1)
      activesupport (>= 4.2.0)
    signet (0.15.0)
      addressable (~> 2.3)
      faraday (>= 0.17.3, < 2.0)
      jwt (>= 1.5, < 3.0)
      multi_json (~> 1.10)
    simple_form (5.1.0)
      actionpack (>= 5.2)
      activemodel (>= 5.2)
    sitemap_generator (6.1.2)
      builder (~> 3.0)
    slack-notifier (2.4.0)
    spreadsheet (1.2.8)
      ruby-ole
    sprockets (3.7.2)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.2.2)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    temple (0.8.2)
    terrapin (0.6.0)
      climate_control (>= 0.0.3, < 1.0)
    thor (1.1.0)
    tilt (2.0.10)
    trailblazer-option (0.1.1)
    turbolinks (5.2.1)
      turbolinks-source (~> 5.2)
    turbolinks-source (5.2.0)
    tzinfo (2.0.4)
      concurrent-ruby (~> 1.0)
    uber (0.1.0)
    uglifier (4.2.0)
      execjs (>= 0.3.0, < 3)
    unicode-display_width (2.0.0)
    view_component (2.31.1)
      activesupport (>= 5.0.0, < 7.0)
    warden (1.2.9)
      rack (>= 2.0.9)
    webrick (1.7.0)
    websocket-driver (0.7.3)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.5)
    wicked_pdf (2.1.0)
      activesupport
    wkhtmltopdf-binary (0.12.6)
    xpath (3.2.0)
      nokogiri (~> 1.8)
    zeitwerk (2.4.2)

PLATFORMS
  ruby

DEPENDENCIES
  actionpack-action_caching (~> 1.2, >= 1.2.2)
  active_elastic_job
  active_model_serializers (~> 0.10.10)
  amazon_pay
  apipie-rails
  audited (~> 4.9)
  avatax
  awesome_print
  aws-sdk-s3 (~> 1)
  bootsnap (~> 1.4.2)
  bootstrap-filestyle-rails
  bootstrap-sass
  braintree
  browser
  capybara
  chartjs-ror
  country-select
  dalli
  devise
  dropzonejs-rails
  elasticsearch-model (~> 7.1)
  elasticsearch-persistence (~> 7.1)
  elasticsearch-rails (~> 7.1)
  factory_bot_rails
  faker
  faraday_middleware
  flutie
  fog-aws
  font_assets
  friendly_id
  geocoder
  google-apis-analyticsreporting_v4
  gridhook!
  hairtrigger
  haml (~> 5.1, >= 5.1.2)
  honeybadger
  httplog
  inky-rb
  jbuilder (~> 2.10)
  jhtmlarea
  jquery-datetimepicker-rails
  jquery-rails
  jquery-ui-rails (= 5.0.3)
  kaminari
  letter_opener_web
  listen
  masonry-rails
  memcachier
  mocha
  newrelic_rpm
  paperclip (~> 6.0.0)
  paperclip-compression
  pg
  pg_search
  pghero
  premailer-rails
  pry-rails
  puma (~> 3.11)
  puma_worker_killer
  rack (~> 2.1, >= 2.1.2)
  rack-cors
  rack-maintenance
  rack-tracker
  rails (~> 6.1, >= 6.1.3.1)
  rails-controller-testing
  rails-healthcheck
  rails_12factor
  recaptcha
  rspec-rails (~> 4.0.0.beta)
  rubocop
  rubocop-rails
  rubocop-rspec
  ruby_parser (~> 3.11)
  rubyzip (>= 1.0.0)
  s3_direct_upload!
  sass-rails (~> 5.0)
  sdoc (~> 0.4.0)
  selenium-webdriver
  sendgrid
  shoulda-matchers
  simple_form
  sitemap_generator
  slack-notifier
  spreadsheet
  turbolinks (~> 5.2.0)
  uglifier (>= 1.3.0)
  view_component
  wicked_pdf (~> 2.0, >= 2.0.1)
  wkhtmltopdf-binary (= 0.12.6)

RUBY VERSION
   ruby 2.7.4p191

BUNDLED WITH
   2.2.15

不幸的是,发生了意外错误,Bundler 无法继续。

首先,尝试此链接以查看是否存在针对此错误的任何现有问题报告: https://github.com/rubygems/rubygems/search?q=No+such+file+or+directory+-+git&type=Issues

如果还没有关于此错误的任何报告,请将上面的报告模板复制并粘贴到新问题中。不要忘记匿名化任何私人数据!新发行表格位于: https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md

[8 月 3 日更新]

通过使用来自 ruby​​gems.org 的 gems 并临时评论来自 GIT 的 gems,我能够解决这个问题。

现在构建已成功部署,我可以看到最新的代码在 /var/app/current 目录中。

但是服务器仍然没有响应。

我尝试过的事情:

  1. /var/log/eb-engine.log 检查日志 - 未观察到错误
  2. /var/log/cfn-init.log 检查日志 - 未观察到错误
  3. 未在以下位置找到 puma 日志文件:/var/log/puma
  4. 在 Nginx 日志中未观察到错误:/var/log/niginx/error.log
  5. 当我进入 /var/app/current 并尝试执行 bundle exec rails console 时,我得到:rails 命令未找到
  6. gem list rails 没有给出空列表

我不知道发生了什么!请建议。

相关问题