I have a Rails application, recently I changed my database from MySql to PostgreSql, from then onwards active-records import method :on_duplicate_key_update is throwing an error.

def import_of_products(import_links)
  Product.import import_links, :on_duplicate_key_update => [:ad_id]   
end 

The error showing is,

NoMethodError: undefined method `sql_for_on_duplicate_key_update' for #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0xab19f90>
from /home/mysystem/.rvm/gems/ruby-2.0.0-p643/gems/activerecord-import-0.4.1/lib/activerecord-import/adapters/abstract_adapter.rb:48:in `post_sql_statements'

I'm running:

Rails version: 4.0.2
Ruby version: 2.0.0p643
0

There are 0 answers