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

Commit

Permalink
Install bundler
Browse files Browse the repository at this point in the history
Override the existing install_bundler task from the
capistrano-rbenv-install gem to install the version of bundler that is
used in the application. This avoids issues with incompatibilities
between Ruby versions and versions of the bundler gem.
  • Loading branch information
awead committed May 8, 2019
1 parent 01ba59f commit 09ac793
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@
end
end

namespace :rbenv do
desc 'Overrides task in capistrano-rbenv-install to install the correct version of the bundler gem'
task install_bundler: ['rbenv:map_bins'] do
on roles fetch(:rbenv_roles) do
next if test :gem, :query, "--quiet --installed --name-matches ^bundler (#{Bundler::VERSION})$"

execute :gem, :install, :bundler, "--quiet --no-document --version #{Bundler::VERSION}"
end
end
end

namespace :deploy do
desc 'Verify yaml configuration files are present and contain the correct keys'
task :check_configs do
Expand Down

0 comments on commit 09ac793

Please sign in to comment.