Capistrano 3: Running a command on all servers

Posted 4 months ago by Dominik Schöler.

This Capistrano task runs a command on all servers. bundle exec cap production app:run cmd='zgrep -P "..." RAILS_ROOT/log/production.log...

Capistrano: creating a database dump if migrating

Posted 4 months ago by Dominik Schöler.

In Capistrano 3, your Capfile requires 'capistrano/rails/migrations', which brings two Capistrano tasks: deploy:migrate and deploy:migrating. The former checks...

How to make sure that manual deploy tasks (scheduled in Pivotal Tracker) are executed on deploy (with Capistrano)

Posted 6 months ago by Dominik Schöler.

We regularly have tasks that need to be performed around a deploy. Be it to notify operations about changed application...

Local deployment after pipeline succeeds

Posted 9 months ago by Michael Leimstädtner.

If you have a fully functional CI pipeline but no CD, you might find yourself frequently waiting for CI (with...

Rails: Fixing ETags that never match

Posted 11 months ago by Henning Koch.

Every Rails response has a default ETag header. In theory this would enable caching for multiple requests to the same...

Heads up: Deployment with newly generated SSH key (using ED25519) might fail

Posted About 1 year ago by Fabian Schwarz.

If you use a newer SSH key generated with the ED25519 algorithm instead of RSA (see Create a new SSH...

Story Checklist Template

Posted About 1 year ago by Felix Eschey.

This is an story checklist I use to work on stories. For this purpose I extracted several cards related to...

Fix: esbuild assets are missing after capistrano deploy

Posted Almost 2 years ago by Tobias Kraze.

Issue: You have an app using jsbundling-rails and esbuild. After deploy, the assets built by esbuild are missing in...

net-ssh and openssl-3.0.0

Posted About 2 years ago by Stefan Langenmaier.

You'll need openssl-3 or newer for servers running 22.04 Ruby version 3.1 uses by default the gem openssl...

Deployment: Merge consecutive commits without cherry-picking

Posted Over 2 years ago by Julian.

You want to deploy new features but the latest commits are not ready for production? Then use git merge master...

When does Webpacker compile?

Posted Almost 3 years ago by Henning Koch.

Webpack builds can take a long time, so we only want to compile when needed. This card shows what will...

Capistrano: Deployment issue undefined method `[]' for nil:NilClass

Posted About 3 years ago by Julian.

In newer passenger versions the output of passenger -v has changed. capistrano-passenger tries to parse the version and now...

Delivering Carrierwave attachments to authorized users only

Posted About 3 years ago by Dominic Beger.

To attach files to your records, you will need a new database column representing the filename of the file...

How to fix "Command "webpack" not found"

Posted About 3 years ago by Michael Leimstädtner.

I just ran into this deployment error after switching from the asset pipeline to webpack: 01:05 deploy:assets:precompile...

SSHKit 1.9.0 failure for Capistrano deploy

Posted Over 3 years ago by Emanuel.

SSHKit 1.9.0 might fail with the following error, when trying to deploy a Rail application. Upgrading the gem to version...

Whenever requires you to set the application attribute in the Capistrano config

Posted Over 3 years ago by Emanuel.

Whenever requires you to set the application attribute in your Capistrano configuration. Otherwise your cronjobs are created multiple times.

Configuring Webpacker deployments with Capistrano

Posted Over 3 years ago by Dominik Schöler.

When deploying a Rails application that is using Webpacker and Capistrano, there are a few configuration tweaks that optimize the...

Carrierwave: How to migrate to another folder structure

Posted Over 3 years ago by Florian Leinsinger.

A flat folder structure can be cool if you have only a few folders but can be painful for huge...

Geordi 4 released

Posted Over 3 years ago by Dominik Schöler.

4.0.0 2020-07-30 Compatible changes Improved documentation; README now includes command options. Improvement #90: geordi console, geordi deploy, geordi...

whenever: Installing cron jobs only for a given Rails environment or Capistrano stage

Posted Almost 4 years ago by Henning Koch.

We use the whenever gem to automatically update the crontab of the servers we deploy to. By default, whenever will...

Bundler in deploy mode shares gems between patch-level Ruby versions

Posted Almost 4 years ago by Michael Leimstädtner.

A recent patch level Ruby update caused troubles to some of us as applications started to complain about incompatible gem...

Fix for "Rails assets manifest file not found" in Capistrano deploy

Posted Over 4 years ago by Tobias Kraze.

If you use webpacker in your Rails application, and you have completely disabled Sprockets, you might get the following error...

Capistrano: Finding out who deployed which revision of your application and when

Posted Over 4 years ago by Arne Hartherz.

Capistrano automatically logs each (successful) deployment into a file on your application servers. It is located at the root of...

Webpack(er): A primer

Posted Almost 5 years ago by Tobias Kraze.

webpack is a very powerful asset bundler written in node.js to bundle (ES6) JavaScript modules, stylesheets, images, and other assets...