Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dennis-every/ruby-on-rails-7-template
A starter template for my Ruby on Rails 7 apps
https://github.com/dennis-every/ruby-on-rails-7-template
Last synced: about 1 month ago
JSON representation
A starter template for my Ruby on Rails 7 apps
- Host: GitHub
- URL: https://github.com/dennis-every/ruby-on-rails-7-template
- Owner: dennis-every
- License: other
- Created: 2023-07-15T14:22:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-07T22:43:21.000Z (about 1 year ago)
- Last Synced: 2024-11-20T23:00:53.506Z (about 2 months ago)
- Language: Ruby
- Size: 119 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# README
## About
This is a Ruby on Rails 7 application template to start quickly a new application with my most common used gems.
## What's included?
### JavaScript
- Hotwire
- Stimulus
- Importmaps### Styles
- Bootstrap
### Data & database
- Faker
- PostgreSQL### Authentication & authorization
- Devise
- Pundit### Tests
- Rspec
- Shouldamatchers
- Guard
- Simplecov### Linters
- Rubocop
## How to use?
- Install and start docker
- On the github repo of this template, click on:
- Use this template
- Create a new repo
- Clone the new repo to your local dev environment
- Change into the directory of the new repo on your local dev environment
- Run the command `docker compose up`
- Create first user by seeding the database:
- Shell into the docker container
- `docker exec -it ruby-on-rails-7-template-web-1 sh`
- Seed the database:
- `bin/rails db:seed`
- Verify that user has been created:
- `bin/rails c`
- `User.first`
- User Load (0.6ms) SELECT "users".\* FROM "users" ORDER BY "users"."id" ASC LIMIT $1 [["LIMIT", 1]]## Database
- To view the database tables e.g. to verify migrations after running bin/rails db:migrate
- Shell into the database docker container with psql with the user postgres and database name of postgres:
- `docker exec -it ruby-on-rails-7-template-db-1 psql -U postgres -d postgres`
- List the database tables:
- `\dt`
- List table contents:
- `SELECT * FROM your_table_name LIMIT 10;`