Skip to content
Justin Coyne edited this page Feb 2, 2015 · 3 revisions

Welcome to the alexandria-v2 wiki!

Reindex with error catch

Image.all.each_with_index do |image, idx|
  begin
    puts idx
    image.update_index
  rescue Oargun::RDF::Controlled::ControlledVocabularyError
    puts 'err'
  rescue ActiveFedora::ConstraintError
    puts "constraint error #{image.id}"
  end
end