DRY up rake task initialization

Which will enable rake tasks to work with JDBC postgresql connections