From 8e8bf348dad688c4739c0d2a47523c30eff80a71 Mon Sep 17 00:00:00 2001 From: mnyrop Date: Fri, 1 Nov 2024 11:43:49 -0400 Subject: [PATCH] workaround for core exists error --- lib/tasks/sdr.rake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/tasks/sdr.rake b/lib/tasks/sdr.rake index b64c0a07..699d0b66 100644 --- a/lib/tasks/sdr.rake +++ b/lib/tasks/sdr.rake @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'fileutils' + desc 'Run test suite' task ci: :environment do shared_solr_opts = { managed: true, verbose: true, persist: false, download_dir: 'tmp' } @@ -17,11 +19,11 @@ end namespace :sdr do desc 'Run Solr and GeoBlacklight for interactive development' task server: %i[environment] do |_t, _args| - require 'solr_wrapper' - shared_solr_opts = { managed: true, verbose: true, persist: false, download_dir: 'tmp' } shared_solr_opts[:version] = Settings.SOLR_VERSION if Settings.SOLR_VERSION + FileUtils.rm_rf Settings.SOLR_INSTANCE_DIR + SolrWrapper.wrap(shared_solr_opts.merge(port: Settings.SOLR_PORT, instance_dir: Settings.SOLR_INSTANCE_DIR)) do |solr| solr.with_collection(name: Settings.SOLR_INSTANCE_NAME, dir: Rails.root.join('solr/conf').to_s) do puts "Solr running at #{Settings.SOLR_URL}, ^C to exit"