We’ve put off implementing the database layer for as long as we could. But with the rest of the surrounding layers defined, it’s all that’s left.
For this exercise, you’re going to use a Ruby database library called Sequel. Sequel allows you to create tables, add data, and so on, without tying your code to any specific database product. You’ll still need to choose a database, though, and for this project the low-maintenance SQLite library will do fine.
Go ahead and add the following two lines to your Gemfile:
|||gem 'sequel', '4.48.0'|
|||gem 'sqlite3', '1.3.13'|
Now, rerun Bundler to install the new libraries:
|||$ bundle install|