rails new upsert-demo
cd upsert-demo
echo 'gem "upsert"' >> Gemfile
echo 'gem "rb-readline", "0.4.2"' >> Gemfile
bundle
rails g model try i:integer s
rake db:migrate
rails c
Upsert creates the first row successfully. When updating the same record, it duplicates it:
For sqlite3 problem with rails 3.2.16 see below: https://github.com/seamusabshere/upsert/issues/19#issuecomment-34584714
In rails 4.0.2:
Lets generate a 4.0.2 application:
Upsert creates the first row successfully. When updating the same record, it duplicates it:
Gemfile.lock: