Frankly
frankly is a small Thor-based Sinatra scaffold generator.
It creates a PostgreSQL + ActiveRecord app with a minimal RSpec setup.
Requirements
- Ruby 3.1+
- PostgreSQL
- Bundler
Installation
gem install franklyUsage
frankly my_appCommon options:
frankly my_app --bundle
frankly my_app --skip-git-
--bundle: runsbundle installin the generated app -
--skip-git: skipsgit init
What It Generates
my_app/
app.rb
config.ru
Gemfile
Rakefile
config/
environment.rb
database.rb
app/views/
layout.erb
index.erb
spec/
spec_helper.rb
requests/app_spec.rb
Name and DB Naming Behavior
- The generated folder keeps your requested name (downcased), including hyphens.
- Default database names are PostgreSQL-friendly and use underscores.
- Example:
frankly my-appcreatesmy-app/, with default DB names likemy_app_development.
Generated App Quickstart
cd my_app
bundle install
bundle exec rackup
bundle exec bin/consoleOpen http://localhost:9292.
Troubleshooting
- PostgreSQL not running:
- Start Postgres and set
DATABASE_URL, then runbundle exec rake db:create db:migrate.
- Start Postgres and set
- Port already in use (
9292):- Run on another port, e.g.
bundle exec rackup -p 9393.
- Run on another port, e.g.
Development (this gem)
bin/setup
bundle exec rspecLicense
MIT. See LICENSE.txt.