diff --git a/lib/generators/spotlight/install_generator.rb b/lib/generators/spotlight/install_generator.rb index fa23ef061..7f79134fd 100644 --- a/lib/generators/spotlight/install_generator.rb +++ b/lib/generators/spotlight/install_generator.rb @@ -152,15 +152,6 @@ def add_mailer_defaults end end - def generate_config - directory 'config' - end - - def add_solr_config_resources - copy_file '.solr_wrapper.yml', '.solr_wrapper.yml' - directory 'solr' - end - def generate_devise_invitable gem 'devise_invitable' bundle_install @@ -168,8 +159,13 @@ def generate_devise_invitable generate 'devise_invitable', 'User' end - def add_translations - copy_file 'config/initializers/translation.rb' + def generate_config + directory 'config' + end + + def add_solr_config_resources + copy_file '.solr_wrapper.yml', '.solr_wrapper.yml' + directory 'solr' end def configure_logging diff --git a/lib/generators/spotlight/templates/config/initializers/translation.rb b/lib/generators/spotlight/templates/config/initializers/translation.rb index 0cc4a6680..93a691d0a 100644 --- a/lib/generators/spotlight/templates/config/initializers/translation.rb +++ b/lib/generators/spotlight/templates/config/initializers/translation.rb @@ -7,8 +7,10 @@ # Don't allow initializer to break if DB doesn't exist yet # see: https://github.com/projectblacklight/spotlight/issues/2133 if ENV['SKIP_TRANSLATION'].blank? - raise unless Translation.table_exists? - + unless Translation.table_exists? + warn "Translation table doesn't exist. Skipping translation config." + next + end ## # Sets up the new Spotlight Translation backend, backed by ActiveRecord. To # turn on the ActiveRecord backend, uncomment the following lines.