Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Can't deploy via Capistrano. Gemfile.lock issue. #1056

Closed
laran opened this Issue Feb 25, 2011 · 4 comments

Comments

Projects
None yet
5 participants

laran commented Feb 25, 2011

I'm using these locally:

laran@ubuntu:/Projects/myapp$ cap --version
Capistrano v2.5.19
laran@ubuntu:
/Projects/myapp$ ruby --version
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux]

On the remote server I have:

me@herediano:/myapp.com/www/releases$ ruby --version
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
me@herediano:
/myapp.com/www/releases$ bundle --version
Bundler version 1.0.10

In my config/deploy.rb I have:

require "bundler/capistrano"

When I run cap deploy the deploy succeeds until I get this:

  • executing "bundle install --gemfile /home/me/myapp.com/www/releases/20110225145153/Gemfile --path /home/me/myapp.com/www/shared/bundle --deployment --quiet --without development test"
    servers: ["myapp.com"]
    [myapp.com] executing command
    *** [err :: myapp.com] sh: bundle: command not found
    command finished
    *** [deploy:update_code] rolling back
  • executing "rm -rf /home/me/myapp.com/www/releases/20110225145153; true"
    servers: ["myapp.com"]
    [myapp.com] executing command
    command finished
    failed: "sh -c 'bundle install --gemfile /home/me/myapp.com/www/releases/20110225145153/Gemfile --path /home/me/myapp.com/www/shared/bundle --deployment --quiet --without development test'" on myapp.com

So I ssh'd to the server and tried to run the command manually. I got this:

me@herediano:~/myapp.com/www/releases$ sh -c 'bundle install --gemfile /home/me/myapp.com/www/releases/20110225145153/Gemfile --path /home/me/myapp.com/www/shared/bundle --deployment --quiet --without development test'
The --deployment flag requires a Gemfile.lock. Please make sure you have checked your Gemfile.lock into version control before deploying.

I do have the Gemfile.lock checked in. And I verified that it's on the server.

What am I missing?

Thanks!

Check for differences in your 'releases' directory on your servers.

Here's a short write up of my experience with this problem.

http://www.octolabs.com/posts/2011/4/22/capistrano_deployment_trouble

jagthedrummer's solution does not work for me. I have no extra directories.

I had this issue and in my case it was a silly mistake. My :deploy_to path didn't have the leading slash so bundler was getting the wrong directory.

Member

ixti commented Jul 8, 2013

Ruby 1.8 is EOL. If you experience same issue with newer Ruby, please open a new issue with details as described in ISSUES.md

@ixti ixti closed this Jul 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment