How to pull Heroku data into a local SQLite3 database

A few issues. First, your Sequel connection string is wrong. Try

heroku db:pull sqlite:///Users/username/folder/testbackup.db

If you still get an exception, it may be due to a permission issue, so make sure you can write to that path.

Your Rubygem version error is because the current version of taps requires Sequel 3.13.0, and you already activated 3.15.0. You either need to use 3.13.0 or you need to edit the taps gem spec to use 3.15.0.

The PRIMARY KEY must be unique is an SQLite exception. Without the full backtrace and code it's hard to guess why it is occurring.