Skip to content

Instantly share code, notes, and snippets.

@matan23
Forked from nevans/eydeploy.rb
Created June 30, 2014 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matan23/7b8111c68e28ca1f4c0d to your computer and use it in GitHub Desktop.
Save matan23/7b8111c68e28ca1f4c0d to your computer and use it in GitHub Desktop.
# put this into your config/eydeploy.rb
def bundle
if File.exist?("#{c.release_path}/Gemfile")
info "~> Gemfile detected, bundling gems"
lockfile = File.join(c.release_path, "Gemfile.lock")
bundler_installer = if File.exist?(lockfile)
get_bundler_installer(lockfile)
else
warn_about_missing_lockfile
bundler_09_installer(default_09_bundler)
end
sudo "#{$0} _#{EY::Serverside::VERSION}_ install_bundler #{bundler_installer.version}"
####################################################
# this is the only line that has been changed:
#run "cd #{c.release_path} && bundle _#{bundler_installer.version}_ install #{bundler_installer.options}"
run "exec ssh-agent bash -c 'ssh-add /home/deploy/.ssh/#{c.app}-deploy-key && cd #{c.release_path} && bundle _#{bundler_installer.version}_ install #{bundler_installer.options}'"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment