Rails Capistrano - SSHKit::Command::Failed:包退出状态:16
Rails Capistrano - SSHKit::Command::Failed: bundle exit status: 16
我不知道这里出了什么问题。我按照这里的指示操作。
http://www.rubytreesoftware.com/resources/ruby-on-rails-41-ubuntu-1404-server-deployment
我一路顺利地完成了部署部分,现在我收到以下错误消息:
$ cap production deploy
INFO [0af71d8d] Running /usr/bin/env mkdir -p /tmp/keepr/ as deploy@crane.local
DEBUG [0af71d8d] Command: /usr/bin/env mkdir -p /tmp/keepr/
INFO [0af71d8d] Finished in 0.637 seconds with exit status 0 (successful).
DEBUG Uploading /tmp/keepr/git-ssh.sh 0.0%
INFO Uploading /tmp/keepr/git-ssh.sh 100.0%
INFO [1273b238] Running /usr/bin/env chmod +x /tmp/keepr/git-ssh.sh as deploy@crane.local
DEBUG [1273b238] Command: /usr/bin/env chmod +x /tmp/keepr/git-ssh.sh
INFO [1273b238] Finished in 0.103 seconds with exit status 0 (successful).
INFO [b0799806] Running /usr/bin/env git ls-remote --heads git@gitlab.com:forrest/keepr.git as deploy@crane.local
DEBUG [b0799806] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/keepr/git-ssh.sh /usr/bin/env git ls-remote --heads git@gitlab.com:forrest/keepr.git )
DEBUG [b0799806] 7e0b6406c5c4917ea286d2402caf268fed20a9b3 refs/heads/master
INFO [b0799806] Finished in 4.389 seconds with exit status 0 (successful).
INFO [d9c031bb] Running /usr/bin/env mkdir -p /opt/www/keepr/shared /opt/www/keepr/releases as deploy@crane.local
DEBUG [d9c031bb] Command: /usr/bin/env mkdir -p /opt/www/keepr/shared /opt/www/keepr/releases
INFO [d9c031bb] Finished in 0.111 seconds with exit status 0 (successful).
INFO [99586de9] Running /usr/bin/env mkdir -p /opt/www/keepr/shared/log /opt/www/keepr/shared/tmp/pids /opt/www/keepr/shared/tmp/cache /opt/www/keepr/shared/tmp/sockets as deploy@crane.local
DEBUG [99586de9] Command: /usr/bin/env mkdir -p /opt/www/keepr/shared/log /opt/www/keepr/shared/tmp/pids /opt/www/keepr/shared/tmp/cache /opt/www/keepr/shared/tmp/sockets
INFO [99586de9] Finished in 0.097 seconds with exit status 0 (successful).
DEBUG [003515f1] Running /usr/bin/env [ -f /opt/www/keepr/current/REVISION ] as deploy@crane.local
DEBUG [003515f1] Command: [ -f /opt/www/keepr/current/REVISION ]
DEBUG [003515f1] Finished in 0.102 seconds with exit status 1 (failed).
DEBUG [ee78c06a] Running /usr/bin/env [ -f /opt/www/keepr/repo/HEAD ] as deploy@crane.local
DEBUG [ee78c06a] Command: [ -f /opt/www/keepr/repo/HEAD ]
DEBUG [ee78c06a] Finished in 0.095 seconds with exit status 0 (successful).
INFO The repository mirror is at /opt/www/keepr/repo
DEBUG [8223cb30] Running /usr/bin/env if test ! -d /opt/www/keepr/repo; then echo "Directory does not exist '/opt/www/keepr/repo'" 1>&2; false; fi as deploy@crane.local
DEBUG [8223cb30] Command: if test ! -d /opt/www/keepr/repo; then echo "Directory does not exist '/opt/www/keepr/repo'" 1>&2; false; fi
DEBUG [8223cb30] Finished in 0.095 seconds with exit status 0 (successful).
INFO [b84b549b] Running /usr/bin/env git remote update as deploy@crane.local
DEBUG [b84b549b] Command: cd /opt/www/keepr/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/keepr/git-ssh.sh /usr/bin/env git remote update )
DEBUG [b84b549b] Fetching origin
INFO [b84b549b] Finished in 4.306 seconds with exit status 0 (successful).
DEBUG [db5999be] Running /usr/bin/env if test ! -d /opt/www/keepr/repo; then echo "Directory does not exist '/opt/www/keepr/repo'" 1>&2; false; fi as deploy@crane.local
DEBUG [db5999be] Command: if test ! -d /opt/www/keepr/repo; then echo "Directory does not exist '/opt/www/keepr/repo'" 1>&2; false; fi
DEBUG [db5999be] Finished in 0.124 seconds with exit status 0 (successful).
INFO [ac343e31] Running /usr/bin/env mkdir -p /opt/www/keepr/releases/20150103220513 as deploy@crane.local
DEBUG [ac343e31] Command: cd /opt/www/keepr/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/keepr/git-ssh.sh /usr/bin/env mkdir -p /opt/www/keepr/releases/20150103220513 )
INFO [ac343e31] Finished in 0.104 seconds with exit status 0 (successful).
INFO [6286a47b] Running /usr/bin/env git archive master | tar -x -f - -C /opt/www/keepr/releases/20150103220513 as deploy@crane.local
DEBUG [6286a47b] Command: cd /opt/www/keepr/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/keepr/git-ssh.sh /usr/bin/env git archive master | tar -x -f - -C /opt/www/keepr/releases/20150103220513 )
INFO [6286a47b] Finished in 0.115 seconds with exit status 0 (successful).
DEBUG [b2f66990] Running /usr/bin/env if test ! -d /opt/www/keepr/repo; then echo "Directory does not exist '/opt/www/keepr/repo'" 1>&2; false; fi as deploy@crane.local
DEBUG [b2f66990] Command: if test ! -d /opt/www/keepr/repo; then echo "Directory does not exist '/opt/www/keepr/repo'" 1>&2; false; fi
DEBUG [b2f66990] Finished in 0.094 seconds with exit status 0 (successful).
DEBUG [c3391728] Running /usr/bin/env git rev-parse --short master as deploy@crane.local
DEBUG [c3391728] Command: cd /opt/www/keepr/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/keepr/git-ssh.sh /usr/bin/env git rev-parse --short master )
DEBUG [c3391728] 7e0b640
DEBUG [c3391728] Finished in 0.108 seconds with exit status 0 (successful).
DEBUG [4ce7a911] Running /usr/bin/env if test ! -d /opt/www/keepr/releases/20150103220513; then echo "Directory does not exist '/opt/www/keepr/releases/20150103220513'" 1>&2; false; fi as deploy@crane.local
DEBUG [4ce7a911] Command: if test ! -d /opt/www/keepr/releases/20150103220513; then echo "Directory does not exist '/opt/www/keepr/releases/20150103220513'" 1>&2; false; fi
DEBUG [4ce7a911] Finished in 0.097 seconds with exit status 0 (successful).
INFO [074b243c] Running /usr/bin/env echo "7e0b640" >> REVISION as deploy@crane.local
DEBUG [074b243c] Command: cd /opt/www/keepr/releases/20150103220513 && /usr/bin/env echo "7e0b640" >> REVISION
INFO [074b243c] Finished in 0.099 seconds with exit status 0 (successful).
INFO [b0162779] Running /usr/bin/env mkdir -p /opt/www/keepr/releases/20150103220513 /opt/www/keepr/releases/20150103220513/tmp /opt/www/keepr/releases/20150103220513/tmp /opt/www/keepr/releases/20150103220513/tmp as deploy@crane.local
DEBUG [b0162779] Command: /usr/bin/env mkdir -p /opt/www/keepr/releases/20150103220513 /opt/www/keepr/releases/20150103220513/tmp /opt/www/keepr/releases/20150103220513/tmp /opt/www/keepr/releases/20150103220513/tmp
INFO [b0162779] Finished in 0.106 seconds with exit status 0 (successful).
DEBUG [495edd7e] Running /usr/bin/env [ -L /opt/www/keepr/releases/20150103220513/log ] as deploy@crane.local
DEBUG [495edd7e] Command: [ -L /opt/www/keepr/releases/20150103220513/log ]
DEBUG [495edd7e] Finished in 0.104 seconds with exit status 1 (failed).
DEBUG [92115df6] Running /usr/bin/env [ -d /opt/www/keepr/releases/20150103220513/log ] as deploy@crane.local
DEBUG [92115df6] Command: [ -d /opt/www/keepr/releases/20150103220513/log ]
DEBUG [92115df6] Finished in 0.078 seconds with exit status 0 (successful).
INFO [0c5f4d4f] Running /usr/bin/env rm -rf /opt/www/keepr/releases/20150103220513/log as deploy@crane.local
DEBUG [0c5f4d4f] Command: /usr/bin/env rm -rf /opt/www/keepr/releases/20150103220513/log
INFO [0c5f4d4f] Finished in 0.102 seconds with exit status 0 (successful).
INFO [bd00dd5f] Running /usr/bin/env ln -s /opt/www/keepr/shared/log /opt/www/keepr/releases/20150103220513/log as deploy@crane.local
DEBUG [bd00dd5f] Command: /usr/bin/env ln -s /opt/www/keepr/shared/log /opt/www/keepr/releases/20150103220513/log
INFO [bd00dd5f] Finished in 0.093 seconds with exit status 0 (successful).
DEBUG [22246fbe] Running /usr/bin/env [ -L /opt/www/keepr/releases/20150103220513/tmp/pids ] as deploy@crane.local
DEBUG [22246fbe] Command: [ -L /opt/www/keepr/releases/20150103220513/tmp/pids ]
DEBUG [22246fbe] Finished in 0.096 seconds with exit status 1 (failed).
DEBUG [bd4bdb48] Running /usr/bin/env [ -d /opt/www/keepr/releases/20150103220513/tmp/pids ] as deploy@crane.local
DEBUG [bd4bdb48] Command: [ -d /opt/www/keepr/releases/20150103220513/tmp/pids ]
DEBUG [bd4bdb48] Finished in 0.117 seconds with exit status 1 (failed).
INFO [d585f94a] Running /usr/bin/env ln -s /opt/www/keepr/shared/tmp/pids /opt/www/keepr/releases/20150103220513/tmp/pids as deploy@crane.local
DEBUG [d585f94a] Command: /usr/bin/env ln -s /opt/www/keepr/shared/tmp/pids /opt/www/keepr/releases/20150103220513/tmp/pids
INFO [d585f94a] Finished in 0.094 seconds with exit status 0 (successful).
DEBUG [2985de84] Running /usr/bin/env [ -L /opt/www/keepr/releases/20150103220513/tmp/cache ] as deploy@crane.local
DEBUG [2985de84] Command: [ -L /opt/www/keepr/releases/20150103220513/tmp/cache ]
DEBUG [2985de84] Finished in 0.102 seconds with exit status 1 (failed).
DEBUG [49be211a] Running /usr/bin/env [ -d /opt/www/keepr/releases/20150103220513/tmp/cache ] as deploy@crane.local
DEBUG [49be211a] Command: [ -d /opt/www/keepr/releases/20150103220513/tmp/cache ]
DEBUG [49be211a] Finished in 0.108 seconds with exit status 1 (failed).
INFO [93149839] Running /usr/bin/env ln -s /opt/www/keepr/shared/tmp/cache /opt/www/keepr/releases/20150103220513/tmp/cache as deploy@crane.local
DEBUG [93149839] Command: /usr/bin/env ln -s /opt/www/keepr/shared/tmp/cache /opt/www/keepr/releases/20150103220513/tmp/cache
INFO [93149839] Finished in 0.103 seconds with exit status 0 (successful).
DEBUG [a1d5076e] Running /usr/bin/env [ -L /opt/www/keepr/releases/20150103220513/tmp/sockets ] as deploy@crane.local
DEBUG [a1d5076e] Command: [ -L /opt/www/keepr/releases/20150103220513/tmp/sockets ]
DEBUG [a1d5076e] Finished in 0.101 seconds with exit status 1 (failed).
DEBUG [0fd9b610] Running /usr/bin/env [ -d /opt/www/keepr/releases/20150103220513/tmp/sockets ] as deploy@crane.local
DEBUG [0fd9b610] Command: [ -d /opt/www/keepr/releases/20150103220513/tmp/sockets ]
DEBUG [0fd9b610] Finished in 0.092 seconds with exit status 1 (failed).
INFO [1d109d18] Running /usr/bin/env ln -s /opt/www/keepr/shared/tmp/sockets /opt/www/keepr/releases/20150103220513/tmp/sockets as deploy@crane.local
DEBUG [1d109d18] Command: /usr/bin/env ln -s /opt/www/keepr/shared/tmp/sockets /opt/www/keepr/releases/20150103220513/tmp/sockets
INFO [1d109d18] Finished in 0.093 seconds with exit status 0 (successful).
DEBUG [c10ad392] Running /usr/bin/env if test ! -d /opt/www/keepr/releases/20150103220513; then echo "Directory does not exist '/opt/www/keepr/releases/20150103220513'" 1>&2; false; fi as deploy@crane.local
DEBUG [c10ad392] Command: if test ! -d /opt/www/keepr/releases/20150103220513; then echo "Directory does not exist '/opt/www/keepr/releases/20150103220513'" 1>&2; false; fi
DEBUG [c10ad392] Finished in 0.101 seconds with exit status 0 (successful).
INFO [1ac6e919] Running /usr/bin/env bundle install --binstubs /opt/www/keepr/shared/bin --path /opt/www/keepr/shared/bundle --without development test --deployment --quiet as deploy@crane.local
DEBUG [1ac6e919] Command: cd /opt/www/keepr/releases/20150103220513 && /usr/bin/env bundle install --binstubs /opt/www/keepr/shared/bin --path /opt/www/keepr/shared/bundle --without development test --deployment --quiet
DEBUG [1ac6e919] You are trying to install in deployment mode after changing
DEBUG [1ac6e919] your Gemfile. Run `bundle install` elsewhere and add the
DEBUG [1ac6e919] updated Gemfile.lock to version control.
DEBUG [1ac6e919]
DEBUG [1ac6e919] You have added to the Gemfile:
DEBUG [1ac6e919] * pg
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@crane.local: bundle exit status: 16
bundle stdout: Nothing written
bundle stderr: Nothing written
SSHKit::Command::Failed: bundle exit status: 16
bundle stdout: Nothing written
bundle stderr: Nothing written
DEBUG [1ac6e919] You are trying to install in deployment mode after changing
DEBUG [1ac6e919] your Gemfile. Run `bundle install` elsewhere and add the
DEBUG [1ac6e919] updated Gemfile.lock to version control.
DEBUG [1ac6e919]
DEBUG [1ac6e919] You have added to the Gemfile:
DEBUG [1ac6e919] * pg
回溯的上述部分很好地解释了问题,以及解决方案。
您似乎已将 pg
gem 添加到您的 Gemfile,但尚未在 运行 bundle install
之后提交 Gemfile.lock
中的更改。
bundle install
git commit -am "Changes to Gemfile.lock after including pg gem"
git push origin master
cap production deploy
应该可以解决问题并成功完成部署。
我不知道这里出了什么问题。我按照这里的指示操作。 http://www.rubytreesoftware.com/resources/ruby-on-rails-41-ubuntu-1404-server-deployment
我一路顺利地完成了部署部分,现在我收到以下错误消息:
$ cap production deploy
INFO [0af71d8d] Running /usr/bin/env mkdir -p /tmp/keepr/ as deploy@crane.local
DEBUG [0af71d8d] Command: /usr/bin/env mkdir -p /tmp/keepr/
INFO [0af71d8d] Finished in 0.637 seconds with exit status 0 (successful).
DEBUG Uploading /tmp/keepr/git-ssh.sh 0.0%
INFO Uploading /tmp/keepr/git-ssh.sh 100.0%
INFO [1273b238] Running /usr/bin/env chmod +x /tmp/keepr/git-ssh.sh as deploy@crane.local
DEBUG [1273b238] Command: /usr/bin/env chmod +x /tmp/keepr/git-ssh.sh
INFO [1273b238] Finished in 0.103 seconds with exit status 0 (successful).
INFO [b0799806] Running /usr/bin/env git ls-remote --heads git@gitlab.com:forrest/keepr.git as deploy@crane.local
DEBUG [b0799806] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/keepr/git-ssh.sh /usr/bin/env git ls-remote --heads git@gitlab.com:forrest/keepr.git )
DEBUG [b0799806] 7e0b6406c5c4917ea286d2402caf268fed20a9b3 refs/heads/master
INFO [b0799806] Finished in 4.389 seconds with exit status 0 (successful).
INFO [d9c031bb] Running /usr/bin/env mkdir -p /opt/www/keepr/shared /opt/www/keepr/releases as deploy@crane.local
DEBUG [d9c031bb] Command: /usr/bin/env mkdir -p /opt/www/keepr/shared /opt/www/keepr/releases
INFO [d9c031bb] Finished in 0.111 seconds with exit status 0 (successful).
INFO [99586de9] Running /usr/bin/env mkdir -p /opt/www/keepr/shared/log /opt/www/keepr/shared/tmp/pids /opt/www/keepr/shared/tmp/cache /opt/www/keepr/shared/tmp/sockets as deploy@crane.local
DEBUG [99586de9] Command: /usr/bin/env mkdir -p /opt/www/keepr/shared/log /opt/www/keepr/shared/tmp/pids /opt/www/keepr/shared/tmp/cache /opt/www/keepr/shared/tmp/sockets
INFO [99586de9] Finished in 0.097 seconds with exit status 0 (successful).
DEBUG [003515f1] Running /usr/bin/env [ -f /opt/www/keepr/current/REVISION ] as deploy@crane.local
DEBUG [003515f1] Command: [ -f /opt/www/keepr/current/REVISION ]
DEBUG [003515f1] Finished in 0.102 seconds with exit status 1 (failed).
DEBUG [ee78c06a] Running /usr/bin/env [ -f /opt/www/keepr/repo/HEAD ] as deploy@crane.local
DEBUG [ee78c06a] Command: [ -f /opt/www/keepr/repo/HEAD ]
DEBUG [ee78c06a] Finished in 0.095 seconds with exit status 0 (successful).
INFO The repository mirror is at /opt/www/keepr/repo
DEBUG [8223cb30] Running /usr/bin/env if test ! -d /opt/www/keepr/repo; then echo "Directory does not exist '/opt/www/keepr/repo'" 1>&2; false; fi as deploy@crane.local
DEBUG [8223cb30] Command: if test ! -d /opt/www/keepr/repo; then echo "Directory does not exist '/opt/www/keepr/repo'" 1>&2; false; fi
DEBUG [8223cb30] Finished in 0.095 seconds with exit status 0 (successful).
INFO [b84b549b] Running /usr/bin/env git remote update as deploy@crane.local
DEBUG [b84b549b] Command: cd /opt/www/keepr/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/keepr/git-ssh.sh /usr/bin/env git remote update )
DEBUG [b84b549b] Fetching origin
INFO [b84b549b] Finished in 4.306 seconds with exit status 0 (successful).
DEBUG [db5999be] Running /usr/bin/env if test ! -d /opt/www/keepr/repo; then echo "Directory does not exist '/opt/www/keepr/repo'" 1>&2; false; fi as deploy@crane.local
DEBUG [db5999be] Command: if test ! -d /opt/www/keepr/repo; then echo "Directory does not exist '/opt/www/keepr/repo'" 1>&2; false; fi
DEBUG [db5999be] Finished in 0.124 seconds with exit status 0 (successful).
INFO [ac343e31] Running /usr/bin/env mkdir -p /opt/www/keepr/releases/20150103220513 as deploy@crane.local
DEBUG [ac343e31] Command: cd /opt/www/keepr/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/keepr/git-ssh.sh /usr/bin/env mkdir -p /opt/www/keepr/releases/20150103220513 )
INFO [ac343e31] Finished in 0.104 seconds with exit status 0 (successful).
INFO [6286a47b] Running /usr/bin/env git archive master | tar -x -f - -C /opt/www/keepr/releases/20150103220513 as deploy@crane.local
DEBUG [6286a47b] Command: cd /opt/www/keepr/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/keepr/git-ssh.sh /usr/bin/env git archive master | tar -x -f - -C /opt/www/keepr/releases/20150103220513 )
INFO [6286a47b] Finished in 0.115 seconds with exit status 0 (successful).
DEBUG [b2f66990] Running /usr/bin/env if test ! -d /opt/www/keepr/repo; then echo "Directory does not exist '/opt/www/keepr/repo'" 1>&2; false; fi as deploy@crane.local
DEBUG [b2f66990] Command: if test ! -d /opt/www/keepr/repo; then echo "Directory does not exist '/opt/www/keepr/repo'" 1>&2; false; fi
DEBUG [b2f66990] Finished in 0.094 seconds with exit status 0 (successful).
DEBUG [c3391728] Running /usr/bin/env git rev-parse --short master as deploy@crane.local
DEBUG [c3391728] Command: cd /opt/www/keepr/repo && ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/keepr/git-ssh.sh /usr/bin/env git rev-parse --short master )
DEBUG [c3391728] 7e0b640
DEBUG [c3391728] Finished in 0.108 seconds with exit status 0 (successful).
DEBUG [4ce7a911] Running /usr/bin/env if test ! -d /opt/www/keepr/releases/20150103220513; then echo "Directory does not exist '/opt/www/keepr/releases/20150103220513'" 1>&2; false; fi as deploy@crane.local
DEBUG [4ce7a911] Command: if test ! -d /opt/www/keepr/releases/20150103220513; then echo "Directory does not exist '/opt/www/keepr/releases/20150103220513'" 1>&2; false; fi
DEBUG [4ce7a911] Finished in 0.097 seconds with exit status 0 (successful).
INFO [074b243c] Running /usr/bin/env echo "7e0b640" >> REVISION as deploy@crane.local
DEBUG [074b243c] Command: cd /opt/www/keepr/releases/20150103220513 && /usr/bin/env echo "7e0b640" >> REVISION
INFO [074b243c] Finished in 0.099 seconds with exit status 0 (successful).
INFO [b0162779] Running /usr/bin/env mkdir -p /opt/www/keepr/releases/20150103220513 /opt/www/keepr/releases/20150103220513/tmp /opt/www/keepr/releases/20150103220513/tmp /opt/www/keepr/releases/20150103220513/tmp as deploy@crane.local
DEBUG [b0162779] Command: /usr/bin/env mkdir -p /opt/www/keepr/releases/20150103220513 /opt/www/keepr/releases/20150103220513/tmp /opt/www/keepr/releases/20150103220513/tmp /opt/www/keepr/releases/20150103220513/tmp
INFO [b0162779] Finished in 0.106 seconds with exit status 0 (successful).
DEBUG [495edd7e] Running /usr/bin/env [ -L /opt/www/keepr/releases/20150103220513/log ] as deploy@crane.local
DEBUG [495edd7e] Command: [ -L /opt/www/keepr/releases/20150103220513/log ]
DEBUG [495edd7e] Finished in 0.104 seconds with exit status 1 (failed).
DEBUG [92115df6] Running /usr/bin/env [ -d /opt/www/keepr/releases/20150103220513/log ] as deploy@crane.local
DEBUG [92115df6] Command: [ -d /opt/www/keepr/releases/20150103220513/log ]
DEBUG [92115df6] Finished in 0.078 seconds with exit status 0 (successful).
INFO [0c5f4d4f] Running /usr/bin/env rm -rf /opt/www/keepr/releases/20150103220513/log as deploy@crane.local
DEBUG [0c5f4d4f] Command: /usr/bin/env rm -rf /opt/www/keepr/releases/20150103220513/log
INFO [0c5f4d4f] Finished in 0.102 seconds with exit status 0 (successful).
INFO [bd00dd5f] Running /usr/bin/env ln -s /opt/www/keepr/shared/log /opt/www/keepr/releases/20150103220513/log as deploy@crane.local
DEBUG [bd00dd5f] Command: /usr/bin/env ln -s /opt/www/keepr/shared/log /opt/www/keepr/releases/20150103220513/log
INFO [bd00dd5f] Finished in 0.093 seconds with exit status 0 (successful).
DEBUG [22246fbe] Running /usr/bin/env [ -L /opt/www/keepr/releases/20150103220513/tmp/pids ] as deploy@crane.local
DEBUG [22246fbe] Command: [ -L /opt/www/keepr/releases/20150103220513/tmp/pids ]
DEBUG [22246fbe] Finished in 0.096 seconds with exit status 1 (failed).
DEBUG [bd4bdb48] Running /usr/bin/env [ -d /opt/www/keepr/releases/20150103220513/tmp/pids ] as deploy@crane.local
DEBUG [bd4bdb48] Command: [ -d /opt/www/keepr/releases/20150103220513/tmp/pids ]
DEBUG [bd4bdb48] Finished in 0.117 seconds with exit status 1 (failed).
INFO [d585f94a] Running /usr/bin/env ln -s /opt/www/keepr/shared/tmp/pids /opt/www/keepr/releases/20150103220513/tmp/pids as deploy@crane.local
DEBUG [d585f94a] Command: /usr/bin/env ln -s /opt/www/keepr/shared/tmp/pids /opt/www/keepr/releases/20150103220513/tmp/pids
INFO [d585f94a] Finished in 0.094 seconds with exit status 0 (successful).
DEBUG [2985de84] Running /usr/bin/env [ -L /opt/www/keepr/releases/20150103220513/tmp/cache ] as deploy@crane.local
DEBUG [2985de84] Command: [ -L /opt/www/keepr/releases/20150103220513/tmp/cache ]
DEBUG [2985de84] Finished in 0.102 seconds with exit status 1 (failed).
DEBUG [49be211a] Running /usr/bin/env [ -d /opt/www/keepr/releases/20150103220513/tmp/cache ] as deploy@crane.local
DEBUG [49be211a] Command: [ -d /opt/www/keepr/releases/20150103220513/tmp/cache ]
DEBUG [49be211a] Finished in 0.108 seconds with exit status 1 (failed).
INFO [93149839] Running /usr/bin/env ln -s /opt/www/keepr/shared/tmp/cache /opt/www/keepr/releases/20150103220513/tmp/cache as deploy@crane.local
DEBUG [93149839] Command: /usr/bin/env ln -s /opt/www/keepr/shared/tmp/cache /opt/www/keepr/releases/20150103220513/tmp/cache
INFO [93149839] Finished in 0.103 seconds with exit status 0 (successful).
DEBUG [a1d5076e] Running /usr/bin/env [ -L /opt/www/keepr/releases/20150103220513/tmp/sockets ] as deploy@crane.local
DEBUG [a1d5076e] Command: [ -L /opt/www/keepr/releases/20150103220513/tmp/sockets ]
DEBUG [a1d5076e] Finished in 0.101 seconds with exit status 1 (failed).
DEBUG [0fd9b610] Running /usr/bin/env [ -d /opt/www/keepr/releases/20150103220513/tmp/sockets ] as deploy@crane.local
DEBUG [0fd9b610] Command: [ -d /opt/www/keepr/releases/20150103220513/tmp/sockets ]
DEBUG [0fd9b610] Finished in 0.092 seconds with exit status 1 (failed).
INFO [1d109d18] Running /usr/bin/env ln -s /opt/www/keepr/shared/tmp/sockets /opt/www/keepr/releases/20150103220513/tmp/sockets as deploy@crane.local
DEBUG [1d109d18] Command: /usr/bin/env ln -s /opt/www/keepr/shared/tmp/sockets /opt/www/keepr/releases/20150103220513/tmp/sockets
INFO [1d109d18] Finished in 0.093 seconds with exit status 0 (successful).
DEBUG [c10ad392] Running /usr/bin/env if test ! -d /opt/www/keepr/releases/20150103220513; then echo "Directory does not exist '/opt/www/keepr/releases/20150103220513'" 1>&2; false; fi as deploy@crane.local
DEBUG [c10ad392] Command: if test ! -d /opt/www/keepr/releases/20150103220513; then echo "Directory does not exist '/opt/www/keepr/releases/20150103220513'" 1>&2; false; fi
DEBUG [c10ad392] Finished in 0.101 seconds with exit status 0 (successful).
INFO [1ac6e919] Running /usr/bin/env bundle install --binstubs /opt/www/keepr/shared/bin --path /opt/www/keepr/shared/bundle --without development test --deployment --quiet as deploy@crane.local
DEBUG [1ac6e919] Command: cd /opt/www/keepr/releases/20150103220513 && /usr/bin/env bundle install --binstubs /opt/www/keepr/shared/bin --path /opt/www/keepr/shared/bundle --without development test --deployment --quiet
DEBUG [1ac6e919] You are trying to install in deployment mode after changing
DEBUG [1ac6e919] your Gemfile. Run `bundle install` elsewhere and add the
DEBUG [1ac6e919] updated Gemfile.lock to version control.
DEBUG [1ac6e919]
DEBUG [1ac6e919] You have added to the Gemfile:
DEBUG [1ac6e919] * pg
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@crane.local: bundle exit status: 16
bundle stdout: Nothing written
bundle stderr: Nothing written
SSHKit::Command::Failed: bundle exit status: 16
bundle stdout: Nothing written
bundle stderr: Nothing written
DEBUG [1ac6e919] You are trying to install in deployment mode after changing
DEBUG [1ac6e919] your Gemfile. Run `bundle install` elsewhere and add the
DEBUG [1ac6e919] updated Gemfile.lock to version control.
DEBUG [1ac6e919]
DEBUG [1ac6e919] You have added to the Gemfile:
DEBUG [1ac6e919] * pg
回溯的上述部分很好地解释了问题,以及解决方案。
您似乎已将 pg
gem 添加到您的 Gemfile,但尚未在 运行 bundle install
之后提交 Gemfile.lock
中的更改。
bundle install
git commit -am "Changes to Gemfile.lock after including pg gem"
git push origin master
cap production deploy
应该可以解决问题并成功完成部署。