Ar-extensions import - on_duplicate_key_update error

This works perfectly the first time i run the script and every row gets
But when ran a second time, when the code should update duplicate table
rows instead of inserting, then this error appears (first object in the

[code]Mysql::Error: #23000Duplicate entry 'One Tree Hill' for key

Lets go through the code real quick..

[code]class CreateShows < ActiveRecord::Migration
  def self.up
    create_table :shows do |t|
      t.string :name
      t.string :url
      t.string :genre
      t.datetime :start_year
      t.datetime :end_year

                add_index(:shows, [:name], :unique => true, :name =>

  def self.down
    drop_table :shows

[quote] require "ar-extensions"
   require "hpricot"
   require "open-uri"

   def index

     @columns = [
     @values = scrape_shows() #returns a correct array with Show objects
     @options = {:validate => false, :on_duplicate_key_update => [:url,
:start_year, :end_year]}

     Show.import @columns, @values, @options

     @shows = Show.find(:all)
     respond_to do |format|
       format.html #index.html.erb


I've google around alot for any solution with no luck.

My friend introduced me to AR-extensions and he simply gave me this
code, which run fine for him, then of course we don't have the same

Anyone have experience with AR-extensions on Windows?
I'm running:
Ruby 1.8.6
Rails 2.1.0
Mongrel 1.1.5
AR-extensions 0.8.0
(yes, with MySQL)

Somehow the code won't recognize a duplicate and still tries to do an
INSERT instead of an UPDATE.