Clean up application servers when deploying
Our development process makes us deploy very often. As the number of releases grows, junk clogs up the hard drive...
Capistrano: Bundler stalls and asks for "Username"
Given you use Capistrano together with bundler to automatically install your gems when deploying. I recently had the problem that...
Geordi: run a capistrano task on all stages
Geordi now has a script that runs capistrano with all known deploy targets (i.e. staging, production…). Use with geordi capistrano...
Customize tokenization of the MySQL FULLTEXT parser
The way MySQL's FULLTEXT tokenizer splits text into word tokens might not always be what you need. E.g. it...
Cronjobs: "Craken" is dead, long live "Whenever"
Our old solution for cronjobs, the "craken" plugin, is no longer maintained and does not work on Rails 3.2+.
Capistrano: How to find out which version of your application is currently live
When deploying, Capistrano puts a REVISION file into your application's release directory. It contains the hash of the commit...
Mysql/Mysql2 agnostic database.yml
If you upgrade to the mysql2 gem, you will run into the problem that the server's database.yml (which is...
Rails asset pipeline: Why relative paths can work in development, but break in production
When using the asset pipeline your assets (images, javascripts, stylesheets, fonts) live in folders inside app: app/assets/fonts app/assets/images...
Update: Shell script to deploy changes to production and not shoot yourself in the foot
deploy-to-production now calls Capistrano with bundle exec since we started to bundle Capistrano in all projects.
Fix capistrano errors: "no such file to load -- net/ssh/authentication/agent/socket" or "uninitialized constant Net::SSH::KnownHosts::SUPPORTED_TYPE"
There is a conflict between current capistrano versions and the 2.5.1 net-ssh gem. Make sure you upgrade to 2.5.2...
Bundle capistrano
Capistrano recently had some API changes that can results in deploys not working when running with old deploy.rb files.
Fix Capistrano warnings: Missing public directories
I got these warnings while deploying a Rails 3.2 app with asset pipeline enabled: *** [err :: host.tld] find: `/opt/www/hollyapp.com/releases/20120503115342/public/images': No such...
Shell script to deploy changes to production and not shoot yourself in the foot
Geordi, our collection of command line tools, has been extended by another command deploy-to-production. This script encapsulates the...
Gherkin: Error during installation
When trying to install the gherkin gem, you might encounter an error with the following lines: ERROR: Error installing gherkin...
Gatekeeping: Guide for developer
Note: This process is tailored to our specific needs and tools at makandra. While it will certainly not apply to...
Gatekeeping: Guide for gatekeeper
Note: This process is tailored to our specific needs and tools at makandra. While it will certainly not apply to...
Make Capistrano use SSH Key Forwarding
When deploying code with Capistrano (depending on your configuration) at some point Capistrano tries to check out code from your...
How to revert features for deployment, merge back, and how to stay sane
Removing features and merging those changes back can be painful. Here is how it worked for me.\
Get color in the Capistrano output
Note: capistrano_colors was merged into Capistrano starting from v2.13.5. However, this requires Ruby 1.9+. If you cannot upgrade Capistrano...
Error "The --deployment flag requires a Gemfile.lock. Please make sure you have checked your Gemfile.lock into version control before deploying."
If you get this error while deploy and you are sure the Gemfile.lock is in the version control check your...
How to fix "unknown role" errors in Capistrano recipes
When you have a complex recipe setup with multistage deployment you may run into this error: `role_list_from': unknown...
We forked craken
We forked craken today and fixed one of the issues we had with new (>0.8.7) rake versions. The craken:install...
Capistrano: Different usernames for each server
If you have different users for different servers, don't use set :user. Encode the username into the server definition...
Capistrano: Delete old releases automatically
Whenever you deploy using Capistrano, a new folder is created within the releases directory on the remote server containing the...