From 897f18032a471e647e0d796c241f911ac1ad0cd8 Mon Sep 17 00:00:00 2001 From: Jeroen Nijhof Date: Mon, 8 Feb 2016 17:31:24 +0100 Subject: [PATCH] Make sure there is a connection before using ActiveRecord --- lib/backup/manager.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb index 099062eeb8b..4962f5e53ce 100644 --- a/lib/backup/manager.rb +++ b/lib/backup/manager.rb @@ -1,6 +1,9 @@ module Backup class Manager def pack + # Make sure there is a connection + ActiveRecord::Base.connection.reconnect! + # saving additional informations s = {} s[:db_version] = "#{ActiveRecord::Migrator.current_version}"