Attempt #6. Used sqlite3 and sqlite3-ruby.