Ruby on Rails application initialized with Hix on Rails.
- Ruby version: 2.6.3
- Rails version: 6.0.2.2
- 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:schema:load 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 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