You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use the PgBackup::Helpers::Database in a custom Capistrano task
require 'rake'
require 'pg_backup/helpers/database'
include PgBackup::Helpers::Database
namespace :database do
task :dev_backup do
on roles(:db) do
within current_path do
with rails_env: fetch(:environment) do
dump_dir = "#{shared_path}/#{fetch(:pg_backup_remote_dump_dir)}"
backup_file = "#{dump_dir}/dev_database.backup"
if !test("[ -d #{dump_dir} ]")
error "Folder '#{dump_dir}' does not exits!"
else
with_database_config do |host, db, user, pw|
` PGPASSWORD=#{pw} pg_dump --host #{host} --username #{user} --clean --format=c --no-owner --no-acl --exclude-table-data 'table' #{db} > #{backup_file} `
end
end
end
end
end
end
end
but looks like ActiveRecord constant is not loaded
I am trying to use the
PgBackup::Helpers::Database
in a custom Capistrano taskbut looks like
ActiveRecord
constant is not loadeduninitialized constant PgBackup::Helpers::Database::ActiveRecord
any hints about how to resolve this?
Thx.
The text was updated successfully, but these errors were encountered: