Getting ready to use database

This commit is contained in:
James 2023-12-28 00:13:50 -06:00
parent 971c5f2233
commit 1a3a4287b0
2 changed files with 9 additions and 1 deletions

View file

@ -4,6 +4,12 @@ gem 'roda'
gem 'rack-unreloader'
gem 'tilt'
gem 'erubi'
gem 'sequel'
# Change to whatever database you plan to use
gem 'sqlite3'
# gem 'pg' # will also want gem sequel-pg
# gem 'mysql2'
# change to gunicorn or passenger if you prefer:
gem 'puma'

View file

@ -2,6 +2,8 @@
For the single file app template, really the only file you need is the config.ru and run it with puma.
## Database
## Views
In this template, I've taken the single-file template and split up the config.ru to put routes and app logic in app.rb and call on templates to render proper html pages. `tilt` and `erubi` gems are added to do the rendering, and `rack-unreloader` gem is added to have puma automatically load file changes while running in development mode.
@ -21,7 +23,7 @@ Will need ruby; install it via package manager or a ruby manager like rbenv/ruby
With this example, will basically just ignore the project's Gemfile. Debian 12 has a pretty current ruby version so just using it.
```
sudo apt install ruby ruby-rack puma ruby-erubi ruby-tilt
sudo apt install ruby ruby-rack puma ruby-erubi ruby-tilt ruby-sequel ruby-sqlite3
sudo gem install roda rack-unreloader
```