diff options
-rw-r--r-- | lib/bundler/capistrano.rb | 2 | ||||
-rw-r--r-- | lib/bundler/deployment.rb | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/bundler/capistrano.rb b/lib/bundler/capistrano.rb index dc551c5041..e37703d7d8 100644 --- a/lib/bundler/capistrano.rb +++ b/lib/bundler/capistrano.rb @@ -5,7 +5,7 @@ require 'bundler/deployment' Capistrano::Configuration.instance(:must_exist).load do - after "deploy:finalize_update", "bundle:install" + before "deploy:finalize_update", "bundle:install" Bundler::Deployment.define_task(self, :task, :except => { :no_release => true }) set :rake, lambda { "#{fetch(:bundle_cmd, "bundle")} exec rake" } end diff --git a/lib/bundler/deployment.rb b/lib/bundler/deployment.rb index 213972a794..7551a8b688 100644 --- a/lib/bundler/deployment.rb +++ b/lib/bundler/deployment.rb @@ -41,16 +41,16 @@ module Bundler bundle_dir = context.fetch(:bundle_dir, File.join(context.fetch(:shared_path), 'bundle')) bundle_gemfile = context.fetch(:bundle_gemfile, "Gemfile") bundle_without = [*context.fetch(:bundle_without, [:development, :test])].compact - current_release = context.fetch(:current_release) - if current_release.to_s.empty? + app_path = context.fetch(:latest_release) + if app_path.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 #{File.join(app_path, 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? - run "cd #{current_release} && #{bundle_cmd} install #{args.join(' ')}" + run "cd #{app_path} && #{bundle_cmd} install #{args.join(' ')}" end end end |