From 42bf4b8edbc2be981648f72b987d4a809180c5dc Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Thu, 22 Feb 2024 12:16:59 -0800 Subject: [PATCH] Use local gems instead of installing from web when deploying, oops! I hadn't realized for a while that we weren't already doing this lol, I had noticed that `bundle install` in production was slower than I expected when adding new stuff, but it was when we did this big recent `bundle update` that I really noticed the difference. Fixed now, I think! Though the real test will come when we actually have a new gem to install, since this was a no-op case. --- deploy/deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deploy/deploy.yml b/deploy/deploy.yml index a45288ae..d6a5dd61 100644 --- a/deploy/deploy.yml +++ b/deploy/deploy.yml @@ -78,7 +78,10 @@ - name: Run `bundle install` to install dependencies in remote folder command: chdir: "{{ remote_app_root }}" - cmd: /opt/ruby-3.3.0/bin/bundle install + # The `--local` flag instructs Bundler to use the cached dependencies + # in `vendor/cache`, instead of reading from the web, which is much + # faster and more reliable! + cmd: /opt/ruby-3.3.0/bin/bundle install --local - name: Update the `current` folder to point to the new version file: