Permalink
Browse files

Added exception rescue in case the texticle:create_indexes raketask f…

…ails.
  • Loading branch information...
1 parent 9303a2e commit 66e7bb23e51e28199cd0796727ba31f9bc55cb5e @ecin ecin committed Jul 5, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/texticle/tasks.rb
View
@@ -35,7 +35,11 @@
ActiveRecord::Base.subclasses.each do |klass|
if klass.respond_to?(:full_text_indexes)
(klass.full_text_indexes || []).each do |fti|
- fti.create
+ begin
+ fti.create
+ rescue ActiveRecord::StatementInvalid => e
+ warn "WARNING: Couldn't create index for #{klass.to_s}, skipping..."
+ end
end
end
end

0 comments on commit 66e7bb2

Please sign in to comment.