Ruby on Rails application initialized with Hix on Rails.
- Ruby version: 2.7.1
- Rails version: 6.0.3.3
- Database: PostgreSQL
- Redis installed
Copy an existing sample environment file. Run:
$ cp .env.sample .env
and edit newly created .env
file. The minimum you are going to need are
credentials to your local PostgreSQL database.
Then, install all the necessary gems:
bundle install
In order to create the database with all the necessary seed data, run:
$ rails db:create db:structure:load:with_data db:seed
The simplest way to start the app is using foreman
gem.
gem install foreman
foreman start -f Procfile.dev
It is not included in the Gemfile, as advised in its documentation.
If you prefer running all of the processes separately, read on.
Start the Ruby on Rails server with:
rails server
To run Sidekiq, launch another process with:
bundle exec sidekiq
In order to intercept emails sent with ActionMailer in development
install the mailcatcher
gem locally:
gem install mailcatcher
and visit your mailbox http://127.0.0.1:1080/.
All emails send with your app will appear here.
In order to run the whole test suite, run:
$ bundle exec rspec
The application provides the following code quality analysis tools:
- Brakeman
- Fasterer
- RuboCop with RuboCop RSpec, RuboCop Performance and RuboCop Rails
- Rails Best Practices
- Bundler Audit
To run them locally:
$ bundle exec brakeman
$ bundle exec fasterer
$ bundle exec rubocop
$ bundle exec rails_best_practices
$ bundle audit