diff --git a/lib/flipper/adapters/active_record.rb b/lib/flipper/adapters/active_record.rb index 33ef56dbc..d64cfb897 100644 --- a/lib/flipper/adapters/active_record.rb +++ b/lib/flipper/adapters/active_record.rb @@ -278,6 +278,9 @@ def result_for_gates(feature, gates) # See https://github.com/flippercloud/flipper/pull/692 def value_not_text? @gate_class.column_for_attribute(:value).type != :text + rescue ::ActiveRecord::StatementInvalid => error + # If the table doesn't exist, the column doesn't exist either + warn "#{error.message}. You likely need to run `rails g flipper:active_record` and/or `rails db:migrate`." end def with_connection(model = @feature_class, &block)