cap deploy failing with a Gemfile.lock required error
bear opened this issue · 4 comments
I forced the deploy to use a release dir of "bear" and created the log directory just so I could get past the previous blocking point, but now I get this:
- 2013-09-09 08:48:26 executing `deploy:cold'
- 2013-09-09 08:48:26 executing `deploy:update'
** transaction: start - 2013-09-09 08:48:26 executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote https://github.com/square/kochiku.git master"
command finished in 419ms - executing "if [ -d /home/kochiku-web/kochiku/shared/cached-copy ]; then cd /home/kochiku-web/kochiku/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard d7c117f && git clean -q -d -x -f; else git clone -q -b master https://github.com/square/kochiku.git /home/kochiku-web/kochiku/shared/cached-copy && cd /home/kochiku-web/kochiku/shared/cached-copy && git checkout -q -b deploy d7c117f; fi"
servers: ["localhost"]
[localhost] executing command
command finished in 1666ms
copying the cached version to /home/kochiku-web/kochiku/releases/bear - executing "cp -RPp /home/kochiku-web/kochiku/shared/cached-copy /home/kochiku-web/kochiku/releases/bear && (echo d7c117f > /home/kochiku-web/kochiku/releases/bear/REVISION)"
servers: ["localhost"]
[localhost] executing command
command finished in 49ms - 2013-09-09 08:48:29 executing
deploy:finalize_update' triggering before callbacks for
deploy:finalize_update' - 2013-09-09 08:48:29 executing `deploy:assets:symlink'
- executing "ls -x /home/kochiku-web/kochiku/releases"
servers: ["localhost"]
[localhost] executing command
command finished in 18ms - executing "rm -rf /home/kochiku-web/kochiku/releases/bear/public/assets && mkdir -p /home/kochiku-web/kochiku/releases/bear/public && mkdir -p /home/kochiku-web/kochiku/shared/assets && ln -s /home/kochiku-web/kochiku/shared/assets /home/kochiku-web/kochiku/releases/bear/public/assets"
servers: ["localhost"]
[localhost] executing command
command finished in 24ms - 2013-09-09 08:48:29 executing `bundle:install'
- executing "cd /home/kochiku-web/kochiku/releases/bear && bundle install --gemfile /home/kochiku-web/kochiku/releases/bear/Gemfile --path /home/kochiku-web/kochiku/shared/bundle --deployment --quiet --without development test"
servers: ["localhost"]
[localhost] executing command
** [out :: localhost] The --deployment flag requires a Gemfile.lock. Please make sure you have checked
** [out :: localhost] your Gemfile.lock into version control before deploying.
command finished in 354ms
*** [deploy:update_code] rolling back - executing "rm -rf /home/kochiku-web/kochiku/releases/bear; true"
servers: ["localhost"]
[localhost] executing command
command finished in 25ms
failed: "env PATH=/usr/local/bin:$PATH sh -c 'cd /home/kochiku-web/kochiku/releases/bear && bundle install --gemfile /home/kochiku-web/kochiku/releases/bear/Gemfile --path /home/kochiku-web/kochiku/shared/bundle --deployment --quiet --without development test'" on localhost
Hmm, don't really know but I wonder if it is related to forcing that release directory. See http://stackoverflow.com/questions/17380027/the-deployment-flag-requires-a-gemfile-lock-please-make-sure-you-have-checked regarding setting bundle_gemfile
. Also see http://stackoverflow.com/questions/14796095/the-deployment-flag-requires-a-gemfile-lock for two other possible causes.
since I am setting the release dir manually I tried the the first suggestion and "app/Gemfile" changed nothing
the second suggestion isn't applicable as the deploy_to path is already an absolute path
Was this fixed with cap deploy: setup
?
cap deploy:setup runs:
kochiku@ops:~/kochiku$ cap deploy:setup
- 2013-09-11 05:34:02 executing `deploy:setup'
- executing "mkdir -p /home/kochiku-web/kochiku /home/kochiku-web/kochiku/releases /home/kochiku-web/kochiku/shared /home/kochiku-web/kochiku/shared/system /home/kochiku-web/kochiku/shared/log /home/kochiku-web/kochiku/shared/pids"
servers: ["ops"]
[ops] executing command
command finished in 680ms - executing "chmod g+w /home/kochiku-web/kochiku /home/kochiku-web/kochiku/releases /home/kochiku-web/kochiku/shared /home/kochiku-web/kochiku/shared/system /home/kochiku-web/kochiku/shared/log /home/kochiku-web/kochiku/shared/pids"
servers: ["ops"]
[ops] executing command
command finished in 14ms
triggering after callbacks for `deploy:setup' - 2013-09-11 05:34:02 executing `kochiku:setup'
- executing "gem install bundler -v '~> 1.3' --conservative"
servers: ["ops"]
[ops] executing command
command finished in 483ms - executing "mkdir -p /home/kochiku-web/kochiku/shared/{build-partition,log_files}"
servers: ["ops"]
[ops] executing command
command finished in 15ms
and then I ran cap deploy:cold and got the Gemfile.lock error
- 2013-09-11 05:35:40 executing `deploy:cold'
- 2013-09-11 05:35:40 executing `deploy:update'
** transaction: start - 2013-09-11 05:35:40 executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote https://github.com/square/kochiku.git master"
command finished in 497ms - executing "if [ -d /home/kochiku-web/kochiku/shared/cached-copy ]; then cd /home/kochiku-web/kochiku/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard c270257 && git clean -q -d -x -f; else git clone -q -b master https://github.com/square/kochiku.git /home/kochiku-web/kochiku/shared/cached-copy && cd /home/kochiku-web/kochiku/shared/cached-copy && git checkout -q -b deploy c270257; fi"
servers: ["ops"]
[ops] executing command
command finished in 2098ms
copying the cached version to /home/kochiku-web/kochiku/releases/20130911053542 - executing "cp -RPp /home/kochiku-web/kochiku/shared/cached-copy /home/kochiku-web/kochiku/releases/20130911053542 && (echo c270257 > /home/kochiku-web/kochiku/releases/20130911053542/REVISION)"
servers: ["ops"]
[ops] executing command
command finished in 57ms - 2013-09-11 05:35:42 executing
deploy:finalize_update' triggering before callbacks for
deploy:finalize_update' - 2013-09-11 05:35:42 executing `deploy:assets:symlink'
- executing "rm -rf /home/kochiku-web/kochiku/releases/20130911053542/public/assets && mkdir -p /home/kochiku-web/kochiku/releases/20130911053542/public && mkdir -p /home/kochiku-web/kochiku/shared/assets && ln -s /home/kochiku-web/kochiku/shared/assets /home/kochiku-web/kochiku/releases/20130911053542/public/assets"
servers: ["ops"]
[ops] executing command
command finished in 22ms - 2013-09-11 05:35:42 executing `bundle:install'
- executing "cd /home/kochiku-web/kochiku/releases/20130911053542 && bundle install --gemfile /home/kochiku-web/kochiku/releases/20130911053542/app/Gemfile --path /home/kochiku-web/kochiku/shared/bundle --deployment --quiet --without development test"
servers: ["ops"]
[ops] executing command
** [out :: ops] The --deployment flag requires a Gemfile.lock. Please make sure you have checked
** [out :: ops] your Gemfile.lock into version control before deploying.
command finished in 336ms
*** [deploy:update_code] rolling back - executing "rm -rf /home/kochiku-web/kochiku/releases/20130911053542; true"
servers: ["ops"]
[ops] executing command
command finished in 28ms
failed: "env PATH=/usr/local/bin:$PATH sh -c 'cd /home/kochiku-web/kochiku/releases/20130911053542 && bundle install --gemfile /home/kochiku-web/kochiku/releases/20130911053542/app/Gemfile --path /home/kochiku-web/kochiku/shared/bundle --deployment --quiet --without development test'" on ops