Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

cap deploy failing with a Gemfile.lock required error #7

Open
bear opened this issue Sep 9, 2013 · 4 comments
Open

cap deploy failing with a Gemfile.lock required error #7

bear opened this issue Sep 9, 2013 · 4 comments

Comments

@bear
Copy link

bear commented Sep 9, 2013

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 fordeploy: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
@jkingdon
Copy link
Contributor

jkingdon commented Sep 9, 2013

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.

@bear
Copy link
Author

bear commented Sep 9, 2013

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

@jkingdon
Copy link
Contributor

Was this fixed with cap deploy: setup?

@bear
Copy link
Author

bear commented Sep 11, 2013

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 fordeploy: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

jeversmann pushed a commit that referenced this issue May 29, 2014
…master

# By Rob Olson
# Via Rob Olson
* commit 'cd1a37d6262cdc7b000db97f5c58405f126e1aa7':
  MavenProjectPromotionJob: request that the cached repo be synced
  Rename the BranchUpdateJob to MavenProjectPromotionJob
  Introduce spec for BranchUpdateJob
  Replace usage of RemoteServer#promote_branch! in BranchUpdateJob
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants