Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

The --deployment flag requires a Gemfile.lock. Please make sure you have checked your Gemfile.lock into version control before deploying. #1799

Closed
wants to merge 1 commit into from

4 participants

@gerwinbrunner

The original command that is created seemed to have a path issue. I made a fix for it.

The command looked like this:

cd test/releases/20120327132342 && bundle install --gemfile test/releases/20120327132342/Gemfile --path test/shared/bundle --deployment --quiet --without development test

Here the Gemfile could not be found, because we are looking in the wrong path

with the patch it looks like this and works:

cd test/releases/20120327132342 && bundle install --gemfile Gemfile --path test/shared/bundle --deployment --quiet --without development test

@indirect
Owner

For most people (including me), this is an absolute path. Why is yours relative?

@gerwinbrunner

Running it on an ubuntu 10.04 LTS

I think both commands are relative... (my bad) to the path I'm currently in.
And because we change in that folder with the beginning "cd test/releases/20120327132342 &&"
it will not work, cause then there needs to be the folder test/releases/20120327132342/test/releases/20120327132342/Gemfile

that's at least what I found out.

@travisbot

This pull request fails (merged fabce69 into b3e9c1a).

@poori

@indirect This seems to happen when you do a relative path to the deployment folder in capistrano's deploy.rb file.

set :deploy_to "relative_path"

instead of

set :deploy_to "absolute_path"

As a workaround, I changed it to an absolute path and it stopped complaining about the Gemfile.lock.

@indirect
Owner
@indirect indirect closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 27, 2012
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/bundler/deployment.rb
View
2  lib/bundler/deployment.rb
@@ -45,7 +45,7 @@ def self.define_task(context, task_method = :task, opts = {})
if current_release.to_s.empty?
raise error_type.new("Cannot detect current release path - make sure you have deployed at least once.")
end
- args = ["--gemfile #{File.join(current_release, bundle_gemfile)}"]
+ args = ["--gemfile #{bundle_gemfile}"]
args << "--path #{bundle_dir}" unless bundle_dir.to_s.empty?
args << bundle_flags.to_s
args << "--without #{bundle_without.join(" ")}" unless bundle_without.empty?
Something went wrong with that request. Please try again.