sqlrubysequel

Ruby Sequel error, table already exists


I realized that I can't run the tutorial (http://sequel.jeremyevans.net/) twice.

The first time, it runs as we expect. But the second time, it raises an error

SQLite3::SQLException: table `items` already exists (Sequel::DatabaseError)

I understand the error, but I don't know how to fix it.

How can I open the DB without losing the data it contains, and still being able to run the tutorial?


Solution

  • The problem is, it tries to create a DB with the same name, but it already exists, so it raises an error.

    Solution: