Home>

Environment

・ ruby ​​2.7.2
・ Rails 6.1.3
・ MacOS

Premise

We are currently implementing our own application to create a portfolio.
Since we have finished deploying on AWS, we are implementing automatic deployment on Capistrano.

Implemented with reference to this article:
https://pikawaka.com/rails/capistrano

Error details

The error occurred in the automatic deploy command% bundle exec cap production deployIt will be after execution.
* Some characters have been omitted because the number of characters has exceeded.

log /capistrano.log

INFO START 2021-09-15 16:15:56 +0900 cap production deploy
  INFO ---------------------------------------------------------------------------
 DEBUG [f0733d10] Running [-d $ HOME /.rbenv /versions /2.7.2] as [email protected]
 DEBUG [f0733d10] Command: [-d $ HOME /.rbenv /versions /2.7.2]
 DEBUG [f0733d10] Finished in 0.354 seconds with exit status 0 (successful).
  INFO [41e5e12a] Running /usr /bin /env mkdir -p /tmp as [email protected]
 DEBUG [41e5e12a] Command: (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; /usr /bin /env mkdir -p /tmp)
  INFO [41e5e12a] Finished in 0.082 seconds with exit status 0 (successful).
 DEBUG Uploading /tmp/git-ssh-ff371dcacdc6ed58b39a.sh 0.0%
  INFO Uploading /tmp/git-ssh-ff371dcacdc6ed58b39a.sh 100.0%
  INFO [0d6289cc] Running /usr /bin /env chmod 700 /tmp/git-ssh-ff371dcacdc6ed58b39a.sh as [email protected]
 DEBUG [0d6289cc] Command: (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; /usr/bin/env chmod 700 /tmp/git-ssh-ff371dcacdc6ed58b39a.sh)
  INFO [0d6289cc] Finished in 0.077 seconds with exit status 0 (successful).
  INFO [26ce24e8] Running /usr/bin/env git ls-remote [email protected]:taddy-korokoro/hana_nav_app.git HEAD as [email protected]
 DEBUG [26ce24e8] Command: (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2" GIT_ASKPASS= "/bin /echo" GIT_SSH= "/tmp /git-ssh-ff371dcacdc6ed58b39a.sh"; /usr/bin /env git ls-remote [email protected]:taddy-korokoro/hana_nav_app.git HEAD)
 DEBUG [26ce24e8] 374079a4e67c6ecfe25fbb11f071c29664418c36 HEAD
  INFO [26ce24e8] Finished in 1.873 seconds with exit status 0 (successful).
  INFO [96e4d28e] Running /usr /bin /env mkdir -p /var /www /hana_nav_app /shared /var /www /hana_nav_app /releases as [email protected]
 DEBUG [96e4d28e] Command: (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; /usr /bin /env mkdir -p /var /www /hana_nav_app /shared /var /www /hana_nav_app /releases )
  INFO [96e4d28e] Finished in 0.032 seconds with exit status 0 (successful).
  INFO [b7a65458] Running /usr /bin /env mkdir -p /var /www /hana_nav_app /shared /log /var /www /hana_nav_app /shared /tmp /pids /var /www /hana_nav_app /shared /tmp /cache /var /www /hana_nav_app /shared /tmp /sockets /var /www /hana_nav_app /shared /vendor /bundle /var /www /hana_nav_app /shared /public /system /var /www /hana_nav_app /shared /public /uploads /var /www /hana_nav_app/shared/public/assets as [email protected]
 DEBUG [b7a65458] Command: (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; /usr /bin /env mkdir -p /var /www /hana_nav_app /shared /log /var /www /hana_nav_app /shared /tmp /pids /var /www /hana_nav_app /shared /tmp /cache /var /www /hana_nav_app /shared /tmp /sockets /var /www /hana_nav_app /shared /vendor /bundle /var /www /hana_nav_app /shared /public /system /var /www /hana_nav_app /shared /public /uploads /var /www /hana_nav_app /shared /public /assets)
  INFO [b7a65458] Finished in 0.076 seconds with exit status 0 (successful).
 DEBUG [7b4fa7e6] Running [-f /var /www /hana_nav_app /current /REVISION] as [email protected]
 DEBUG [7b4fa7e6] Command: [-f /var /www /hana_nav_app /current /REVISION]
 DEBUG [7b4fa7e6] Finished in 0.076 seconds with exit status 1 (failed).
 DEBUG [b27d76c2] Running [-f /var /www /hana_nav_app /repo /HEAD] as [email protected]
 DEBUG [b27d76c2] Command: [-f /var /www /hana_nav_app /repo /HEAD]
 DEBUG [b27d76c2] Finished in 0.074 seconds with exit status 0 (successful).INFO The repository mirror is at /var /www /hana_nav_app /repo DEBUG [aed914b1] Running if test! -D /var /www /hana_nav_app /repo; then echo "Directory does not exist'/var /www /hana_nav_app /repo' "1 >
&
2; false; fi as [email protected]
 DEBUG [aed914b1] Command: if test! -d /var /www /hana_nav_app /repo; then echo "Directory does not exist'/var /www /hana_nav_app /repo'" 1 >
&
2; false; fi
 DEBUG [aed914b1] Finished in 0.074 seconds with exit status 0 (successful).
  INFO [bad024b8] Running /usr/bin/env git remote set-url origin [email protected]:taddy-korokoro/hana_nav_app.git as [email protected]
 DEBUG [bad024b8] Command: cd /var /www /hana_nav_app /repo &
&
 (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2" GIT_ASKPASS= "/bin /echo" GIT_SSH= "/tmp /git-ssh-ff371dcacdc6ed58b39a.sh"; /usr/bin/env git remote set -url origin [email protected]:taddy-korokoro/hana_nav_app.git)
  INFO [bad024b8] Finished in 0.080 seconds with exit status 0 (successful).
  INFO [44a94e02] Running /usr /bin /env git remote update --prune as [email protected]
 DEBUG [44a94e02] Command: cd /var /www /hana_nav_app /repo &
&
 (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2" GIT_ASKPASS= "/bin /echo" GIT_SSH= "/tmp /git-ssh-ff371dcacdc6ed58b39a.sh"; /usr/bin/env git remote update --prune)
 DEBUG [44a94e02] Fetching origin
 DEBUG [44a94e02] Warning: Permanently added the RSA host key for IP address '52.69.186.44' to the list of known hosts.
  INFO [44a94e02] Finished in 2.540 seconds with exit status 0 (successful).
 DEBUG [78e49200] Running if test! -D /var /www /hana_nav_app /repo; then echo "Directory does not exist'/var /www /hana_nav_app /repo'" 1 >
&
2; false; fi as [email protected]
 DEBUG [78e49200] Command: if test! -d /var /www /hana_nav_app /repo; then echo "Directory does not exist'/var /www /hana_nav_app /repo'" 1 >
&
2; false; fi
 DEBUG [78e49200] Finished in 0.075 seconds with exit status 0 (successful).
  INFO [339ee771] Running /usr /bin /env mkdir -p /var /www /hana_nav_app /releases /20210915071559 as [email protected]
 DEBUG [339ee771] Command: cd /var /www /hana_nav_app /repo &
&
 (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2" GIT_ASKPASS= "/bin /echo" GIT_SSH= "/tmp /git-ssh-ff371dcacdc6ed58b39a.sh"; /usr/bin/env mkdir -p /var /www /hana_nav_app /releases /20210915071559)
  INFO [339ee771] Finished in 0.079 seconds with exit status 0 (successful).
  INFO [c8242e12] Running /usr /bin /env git archive master | /usr /bin /env tar -x -f ---C /var /www /hana_nav_app /releases /20210915071559 as [email protected]
 DEBUG [c8242e12] Command: cd /var /www /hana_nav_app /repo &
&
 (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2" GIT_ASKPASS= "/bin /echo" GIT_SSH= "/tmp /git-ssh-ff371dcacdc6ed58b39a.sh"; /usr/bin/env git archive master | /usr /bin /env tar -x -f ---C /var /www /hana_nav_app /releases /20210915071559)
  INFO [c8242e12] Finished in 0.110 seconds with exit status 0 (successful).
 DEBUG [0d45049f] Running if test! -D /var /www /hana_nav_app /repo; then echo "Directory does not exist'/var /www /hana_nav_app /repo'" 1 >
&
2; false; fi as [email protected]
 DEBUG [0d45049f] Command: if test! -d /var /www /hana_nav_app /repo; then echo "Directory does not exist'/var /www /hana_nav_app /repo'" 1 >
&
2; false; fi
 DEBUG [0d45049f] Finished in 0.076 seconds with exit status 0 (successful).
 DEBUG [d0ca4bc5] Running /usr /bin /env git rev-list --max-count= 1 master as [email protected]
 DEBUG [d0ca4bc5] Command: cd /var /www /hana_nav_app /repo &
&
 (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2" GIT_ASKPASS= "/bin /echo" GIT_SSH= "/tmp /git-ssh-ff371dcacdc6ed58b39a.sh"; /usr/bin/env git rev-list --max-count= 1 master)
 DEBUG [d0ca4bc5] 374079a4e67c6ecfe25fbb11f071c29664418c36
 DEBUG [d0ca4bc5] Finished in 0.080 seconds with exit status 0 (successful).
 DEBUG [fc9a9cbc] Running if test! -D /var /www /hana_nav_app /releases /20210915071559; then echo "Directory does not exist'/var /www /hana_nav_app /releases /20210915071559'" 1 >
&
2; false; fi as [email protected] [fc9a9cbc] Command: if test! -D /var /www /hana_nav_app /releases /20210915071559; then echo "Directory does not exist'/var /www /hana_nav_app /releases /20210915071559'" 1 > &
2; false; fi
 DEBUG [fc9a9cbc] Finished in 0.077 seconds with exit status 0 (successful).
  INFO [c8f460e7] Running /usr /bin /env echo "374079a4e67c6ecfe25fbb11f071c29664418c36" >
 REVISION as [email protected]
 DEBUG [c8f460e7] Command: cd /var /www /hana_nav_app /releases /20210915071559 &
&
 (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; /usr /bin /env echo "374079a4e67c6ecfe25fbb11f071c29664418c36" >
 REVISION)
  INFO [c8f460e7] Finished in 0.079 seconds with exit status 0 (successful).
  INFO [d8896c08] Running /usr /bin /env mkdir -p /var /www /hana_nav_app /releases /20210915071559 /var /www /hana_nav_app /releases /20210915071559 /tmp /var /www /hana_nav_app /releases /20210915071559 /vendor /var /www /hana_nav_app /releases /20210915071559 /public as [email protected]
 DEBUG [d8896c08] Command: (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; /usr /bin /env mkdir -p /var /www /hana_nav_app /releases /20210915071559 /var /www /hana_nav_app /releases /20210915071559 /tmp /var /www /hana_nav_app /releases /20210915071559 /vendor /var /www /hana_nav_app /releases /20210915071559 /public)
  INFO [d8896c08] Finished in 0.078 seconds with exit status 0 (successful).
 DEBUG [a104f91b] Running [-L /var /www /hana_nav_app /releases /20210915071559 /log] as [email protected]
 DEBUG [a104f91b] Command: [-L /var /www /hana_nav_app /releases /20210915071559 /log]
 DEBUG [a104f91b] Finished in 0.077 seconds with exit status 1 (failed).
 DEBUG [ca9dcac6] Running [-d /var /www /hana_nav_app /releases /20210915071559 /log] as [email protected]
 DEBUG [ca9dcac6] Command: [-d /var /www /hana_nav_app /releases /20210915071559 /log]
 DEBUG [ca9dcac6] Finished in 0.079 seconds with exit status 0 (successful).
  INFO [e0a60e78] Running /usr /bin /env rm -rf /var /www /hana_nav_app /releases /20210915071559 /log as [email protected]
 DEBUG [e0a60e78] Command: (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; /usr /bin /env rm -rf /var/www/hana_nav_app/releases/20210915071559/log)
  INFO [e0a60e78] Finished in 0.075 seconds with exit status 0 (successful).
  INFO [0d09d2f4] Running /usr /bin /env ln -s /var /www /hana_nav_app /shared /log /var /www /hana_nav_app /releases /20210915071559 /log as [email protected]
 DEBUG [0d09d2f4] Command: (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; /usr /bin /env ln -s /var /www /hana_nav_app /shared /log /var /www /hana_nav_app /releases /20210915071559 /log)
  INFO [0d09d2f4] Finished in 0.074 seconds with exit status 0 (successful).
 DEBUG [9fbc12bc] Running [-L /var /www /hana_nav_app /releases /20210915071559 /tmp /pids] as [email protected]
 DEBUG [9fbc12bc] Command: [-L /var /www /hana_nav_app /releases /20210915071559 /tmp /pids]
 DEBUG [9fbc12bc] Finished in 0.077 seconds with exit status 1 (failed).
 DEBUG [85d52185] Running [-d /var /www /hana_nav_app /releases /20210915071559 /tmp /pids] as [email protected]
 DEBUG [85d52185] Command: [-d /var /www /hana_nav_app /releases /20210915071559 /tmp /pids]
 DEBUG [85d52185] Finished in 0.074 seconds with exit status 0 (successful).
  INFO [4d990d69] Running /usr /bin /env rm -rf /var/www/hana_nav_app/releases/20210915071559/tmp/pids as [email protected]
 DEBUG [4d990d69] Command: (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; /usr /bin /env rm -rf /var/www/hana_nav_app/releases/20210915071559/tmp/pids)
  INFO [4d990d69] Finished in 0.076 seconds with exit status 0 (successful).
  INFO [f25558fe] Running /usr /bin /env ln -s /var /www /hana_nav_app /shared /tmp /pids /var /www /hana_nav_app /releases /20210915071559 /tmp /pids as [email protected]
 DEBUG [f25558fe] Command: (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; /usr /bin /env ln -s /var /www /hana_nav_app /shared /tmp /pids /var /www /hana_nav_app /releases /20210915071559 /tmp /pids)
  INFO [f25558fe] Finished in 0.076 seconds with exit status 0 (successful).
 DEBUG [d6610eee] Running [-L /var /www /hana_nav_app /releases /20210915071559 /tmp /cache] as [email protected] [d6610eee] Command: [-L /var /www /hana_nav_app /releases /20210915071559 /tmp /cache] DEBUG [d6610eee] Finished in 0.075 seconds with exit status 1 (failed).
 DEBUG [6b871300] Running [-d /var /www /hana_nav_app /releases /20210915071559 /tmp /cache] as [email protected]
 DEBUG [6b871300] Command: [-d /var /www /hana_nav_app /releases /20210915071559 /tmp /cache]
 DEBUG [6b871300] Finished in 0.076 seconds with exit status 1 (failed).
  INFO [beda094d] Running /usr /bin /env ln -s /var /www /hana_nav_app /shared /tmp /cache /var /www /hana_nav_app /releases /20210915071559 /tmp /cache as [email protected]
 DEBUG [beda094d] Command: (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; /usr /bin /env ln -s /var /www /hana_nav_app /shared /tmp /cache /var /www /hana_nav_app /releases /20210915071559 /tmp /cache)
  INFO [beda094d] Finished in 0.076 seconds with exit status 0 (successful).
 DEBUG [c3ea716b] Running [-L /var /www /hana_nav_app /releases /20210915071559 /tmp /sockets] as [email protected]
 DEBUG [c3ea716b] Command: [-L /var /www /hana_nav_app /releases /20210915071559 /tmp /sockets]
 DEBUG [c3ea716b] Finished in 0.074 seconds with exit status 1 (failed).
 DEBUG [1c40dd2f] Running [-d /var /www /hana_nav_app /releases /20210915071559 /tmp /sockets] as [email protected]
 DEBUG [1c40dd2f] Command: [-d /var /www /hana_nav_app /releases /20210915071559 /tmp /sockets]
 DEBUG [1c40dd2f] Finished in 0.075 seconds with exit status 1 (failed).
  INFO [69877a31] Running /usr /bin /env ln -s /var /www /hana_nav_app /shared /tmp /sockets /var /www /hana_nav_app /releases /20210915071559 /tmp /sockets as [email protected]
 DEBUG [69877a31] Command: (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; /usr /bin /env ln -s /var /www /hana_nav_app /shared /tmp /sockets /var /www /hana_nav_app /releases /20210915071559 /tmp /sockets)
  INFO [69877a31] Finished in 0.078 seconds with exit status 0 (successful).
 DEBUG [536e8dae] Running [-L /var /www /hana_nav_app /releases /20210915071559 /vendor /bundle] as [email protected]
 DEBUG [536e8dae] Command: [-L /var /www /hana_nav_app /releases /20210915071559 /vendor /bundle]
 DEBUG [536e8dae] Finished in 0.077 seconds with exit status 1 (failed).
 DEBUG [4221b4df] Running [-d /var /www /hana_nav_app /releases /20210915071559 /vendor /bundle] as [email protected]
 DEBUG [4221b4df] Command: [-d /var /www /hana_nav_app /releases /20210915071559 /vendor /bundle]
 DEBUG [4221b4df] Finished in 0.077 seconds with exit status 1 (failed).
  INFO [8cb408d3] Running /usr /bin /env ln -s /var /www /hana_nav_app /shared /vendor /bundle /var /www /hana_nav_app /releases /20210915071559 /vendor /bundle as [email protected]
 DEBUG [8cb408d3] Command: (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; /usr /bin /env ln -s /var /www /hana_nav_app /shared /vendor /bundle /var /www /hana_nav_app /releases /20210915071559 /vendor /bundle)
  INFO [8cb408d3] Finished in 0.089 seconds with exit status 0 (successful).
 DEBUG [ad9cc880] Running [-L /var /www /hana_nav_app /releases /20210915071559 /public /system] as [email protected]
 DEBUG [ad9cc880] Command: [-L /var /www /hana_nav_app /releases /20210915071559 /public /system]
 DEBUG [ad9cc880] Finished in 0.078 seconds with exit status 1 (failed).
 DEBUG [b14531e0] Running [-d /var /www /hana_nav_app /releases /20210915071559 /public /system] as [email protected]
 DEBUG [b14531e0] Command: [-d /var /www /hana_nav_app /releases /20210915071559 /public /system]
 DEBUG [b14531e0] Finished in 0.055 seconds with exit status 1 (failed).
  INFO [ed2ec637] Running /usr /bin /env ln -s /var /www /hana_nav_app /shared /public /system /var /www /hana_nav_app /releases /20210915071559 /public /system as [email protected]
 DEBUG [ed2ec637] Command: (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; /usr /bin /env ln -s /var /www /hana_nav_app /shared /public /system /var /www /hana_nav_app /releases /20210915071559 /public /system)
  INFO [ed2ec637] Finished in 0.076 seconds with exit status 0 (successful).
 DEBUG [ac7c4e33] Running [-L /var /www /hana_nav_app /releases /20210915071559 /public /uploads] as [email protected]
 DEBUG [ac7c4e33] Command: [-L /var /www /hana_nav_app /releases /20210915071559 /public /uploads]DEBUG [ac7c4e33] Finished in 0.078 seconds with exit status 1 (failed). DEBUG [69c07993] Running [-d /var /www /hana_nav_app /releases /20210915071559 /public /uploads] as [email protected]
 DEBUG [69c07993] Command: [-d /var /www /hana_nav_app /releases /20210915071559 /public /uploads]
 DEBUG [69c07993] Finished in 0.076 seconds with exit status 1 (failed).
  INFO [2f85ef5a] Running /usr /bin /env ln -s /var /www /hana_nav_app /shared /public /uploads /var /www /hana_nav_app /releases /20210915071559 /public /uploads as [email protected]
 DEBUG [2f85ef5a] Command: (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; /usr /bin /env ln -s /var /www /hana_nav_app /shared /public /uploads /var /www /hana_nav_app /releases /20210915071559 /public /uploads)
  INFO [2f85ef5a] Finished in 0.076 seconds with exit status 0 (successful).
 DEBUG [1179ba34] Running [-L /var /www /hana_nav_app /releases /20210915071559 /public /assets] as [email protected]
 DEBUG [1179ba34] Command: [-L /var /www /hana_nav_app /releases /20210915071559 /public /assets]
 DEBUG [1179ba34] Finished in 0.075 seconds with exit status 1 (failed).
 DEBUG [d9f57f21] Running [-d /var /www /hana_nav_app /releases /20210915071559 /public /assets] as [email protected]
 DEBUG [d9f57f21] Command: [-d /var /www /hana_nav_app /releases /20210915071559 /public /assets]
 DEBUG [d9f57f21] Finished in 0.075 seconds with exit status 1 (failed).
  INFO [276d419d] Running /usr /bin /env ln -s /var /www /hana_nav_app /shared /public /assets /var /www /hana_nav_app /releases /20210915071559 /public /assets as [email protected]
 DEBUG [276d419d] Command: (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; /usr /bin /env ln -s /var /www /hana_nav_app /shared /public /assets /var /www /hana_nav_app /releases /20210915071559 /public /assets)
  INFO [276d419d] Finished in 0.081 seconds with exit status 0 (successful).
 DEBUG [403a0538] Running if test! -D /var /www /hana_nav_app /releases /20210915071559; then echo "Directory does not exist'/var /www /hana_nav_app /releases /20210915071559'" 1 >
&
2; false; fi as [email protected]
 DEBUG [403a0538] Command: if test! -d /var /www /hana_nav_app /releases /20210915071559; then echo "Directory does not exist'/var /www /hana_nav_app /releases /20210915071559'" 1 >
&
2; false; fi
 DEBUG [403a0538] Finished in 0.075 seconds with exit status 0 (successful).
  INFO [525364d5] Running $ HOME /.rbenv /bin /rbenv exec bundle config --local deployment true as [email protected]
 DEBUG [525364d5] Command: cd /var /www /hana_nav_app /releases /20210915071559 &
&
 (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; $ HOME /.rbenv /bin /rbenv exec bundle config --local deployment true)
  INFO [525364d5] Finished in 0.266 seconds with exit status 0 (successful).
  INFO [c862170b] Running $ HOME /.rbenv /bin /rbenv exec bundle config --local path /var/www/hana_nav_app/shared/bundle as [email protected]
 DEBUG [c862170b] Command: cd /var /www /hana_nav_app /releases /20210915071559 &
&
 (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; $ HOME /.rbenv /bin /rbenv exec bundle config --local path /var/www/hana_nav_app/shared/bundle)
  INFO [c862170b] Finished in 0.267 seconds with exit status 0 (successful).
  INFO [d8b8fc4a] Running $ HOME /.rbenv /bin /rbenv exec bundle config --local without development: test as [email protected]
 DEBUG [d8b8fc4a] Command: cd /var /www /hana_nav_app /releases /20210915071559 &
&
 (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; $ HOME /.rbenv /bin /rbenv exec bundle config --local without development: test)
  INFO [d8b8fc4a] Finished in 0.268 seconds with exit status 0 (successful).
 DEBUG [9d4662d1] Running if test! -D /var /www /hana_nav_app /releases /20210915071559; then echo "Directory does not exist'/var /www /hana_nav_app /releases /20210915071559'" 1 >
&
2; false; fi as [email protected]
 DEBUG [9d4662d1] Command: if test! -D /var /www /hana_nav_app /releases /20210915071559; then echo "Directory does not exist'/var /www /hana_nav_app /releases /20210915071559'" 1 >
&
2; false; fi
 DEBUG [9d4662d1] Finished in 0.076 seconds with exit status 0 (successful).DEBUG [ddb33dd6] Running $ HOME /.rbenv /bin /rbenv exec bundle check as [email protected] DEBUG [ddb33dd6] Command: cd /var /www /hana_nav_app /releases /20210915071559 &
&
 (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2"; $ HOME /.rbenv /bin /rbenv exec bundle check)
 DEBUG [ddb33dd6] The Gemfile's dependencies are satisfied
 DEBUG [ddb33dd6] Finished in 0.425 seconds with exit status 0 (successful).
  INFO The Gemfile's dependencies are satisfied, skipping installation
 DEBUG [7fc16dc2] Running if test! -D /var /www /hana_nav_app /releases /20210915071559; then echo "Directory does not exist'/var /www /hana_nav_app /releases /20210915071559'" 1 >
&
2; false; fi as [email protected]
 DEBUG [7fc16dc2] Command: if test! -d /var /www /hana_nav_app /releases /20210915071559; then echo "Directory does not exist'/var /www /hana_nav_app /releases /20210915071559'" 1 >
&
2; false; fi
 DEBUG [7fc16dc2] Finished in 0.073 seconds with exit status 0 (successful).
  INFO [6cbb4d82] Running $ HOME /.rbenv /bin /rbenv exec bundle exec rake assets: precompile as [email protected]
 DEBUG [6cbb4d82] Command: cd /var /www /hana_nav_app /releases /20210915071559 &
&
 (export RBENV_ROOT= "$ HOME /.rbenv" RBENV_VERSION= "2.7.2" RAILS_ENV= "production" RAILS_GROUPS= ""; $ HOME /.rbenv /bin /rbenv exec bundle exec rake assets: precompile)
 DEBUG [6cbb4d82] rake aborted!
 DEBUG [6cbb4d82] LoadError: Error loading the'sqlite3' Active Record adapter. Missing a gem it depends on? sqlite3 is not part of the bundle. Add it to your Gemfile.
 DEBUG [6cbb4d82] /var/www/hana_nav_app/shared/bundle/ruby/2.7.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:13:in `<
main >
'
・
·omit
・
/home/ec2-user/.rbenv/versions/2.7.2/bin/bundle:23:in `load'
/home/ec2-user/.rbenv/versions/2.7.2/bin/bundle:23:in `<
main >
'
 DEBUG [6cbb4d82]
Caused by:
 DEBUG [6cbb4d82] Gem :: LoadError: sqlite3 is not part of the bundle. Add it to your Gemfile.
 DEBUG [6cbb4d82] /var/www/hana_nav_app/shared/bundle/ruby/2.7.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:13:in `<
main >
'
・
·omit
・
 DEBUG [6cbb4d82] Tasks: TOP= >
 environment
 DEBUG [6cbb4d82] (See full trace by running task with --trace)

Tried

When I checked the error part, it said, "Active Record adapter loading error. There are no dependent gems and sqlite3 is not included in the bundle, so please add it to the Gemfile."

When I checked the Gemfile,group: development,: testIngem'sqlite3','~ > 1.3.6'There was a description.

Maybe, the gems needed to install capistranogroup: developmentSqlite3 is described fromgroup: development,: testI put it in, bundle install and executed the automatic deploy command again, but the error content did not change, the version of sqlite3gem'sqlite3','~ > 1.4'It was the same even if I changed it to.

If you have any details, I would appreciate it if you could give me some advice.
Thank you for your cooperation.

Applicable source code

Gemfile

source'https://rubygems.org'
git_source (: github) {| repo | "https://github.com/# {repo} .git"}
ruby '2.7.2'
・
・
・
group: development,: test do
  # Call'byebug' anywhere in the code to stop execution and get a debugger console
  gem'byebug', platforms: [: mri,: mingw,: x64_mingw]
  # Use sqlite3 as the database for Active Record
  # Gem'sqlite3','~ >
 1.4'
  gem'sqlite3','~ >
 1.3.6'
  gem'bullet'
  gem'rspec-rails'
  gem'factory_bot_rails'
end
group: development do
  # Access an interactive console on exception pages or by calling'console' anywhere in the code.
  gem'web-console','>
= 4.1.0'
  # Display performance information such as SQL time and flame graphs for each request in your browser.# Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md gem'rack-mini-profiler','~ >
 2.0'
  gem'listen','~ >
 3.3'
  gem'capistrano'
  gem'capistrano-rbenv'
  gem'capistrano-bundler'
  gem'capistrano-rails'
  gem'capistrano3-unicorn'
end
group: test do
  # Adds support for Capybara system testing and selenium driver
  gem'capybara','>
= 3.26'
  gem'selenium-webdriver'
  # Easy installation and use of web drivers to run system tests with browsers
  gem'webdrivers'
end
group: production do
  gem'unicorn', '5.4.1'
  # Gem'mysql2'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem'tzinfo-data', platforms: [: mingw,: mswin,: x64_mingw,: jruby]
  • Answer # 1
    • Currentlygroup: development,: testSince it is set to install sqlite3 in, it is set to use sqlite3 in development and test environment
    • Capistrano deployment is done in production environment, so sqlite3 cannot be used with the current settings
    • Outside the
    • group blockgem'sqlite3','~ > 1.3.6'If you write, you will be able to use sqlite3 in all environments, so I think that deployment will proceed
  • Answer # 2
    • Currentlygroup: development,: testSince it is set to install sqlite3 in, it is set to use sqlite3 in development and test environment
    • Capistrano deployment is done in production environment, so sqlite3 cannot be used with the current settings
    • Outside the
    • group blockgem'sqlite3','~ > 1.3.6'If you write, you will be able to use sqlite3 in all environments, so I think that deployment will proceed