So you’ve got a simple-but-devastatingly-clever Rails app that doesn’t use a database, you’ve dutifully added the line to config/environment.rb to disable the ActiveRecord framework, and now you’re ready to unleash it to the world, using Capistrano for deployment. But when you run ‘cap deploy:cold’, it merrily tries to run database migrations and fails with “uninitialized constant ActiveRecord”. How do you make Capistrano behave?
A simple question, with a simple answer, but one which is curiously absent from the internet. Googlejuice ahoy!
Stick this at the bottom of config/deploy.rb:
namespace :deploy do desc "Override deploy:cold to NOT run migrations - there's no database" task :cold do update start end end