From 27a706df4e899d2cf7413249c29e168cde0f3aac Mon Sep 17 00:00:00 2001
From: Nataliia Makarenko <73568587+NVMakarenko@users.noreply.github.com>
Date: Sat, 26 Oct 2024 17:47:28 +0300
Subject: [PATCH 1/4] Update README.md
add description for installation on Windows.
---
README.md | 272 +++++++++++++++++++++++++++---------------------------
1 file changed, 136 insertions(+), 136 deletions(-)
diff --git a/README.md b/README.md
index 6c5aa996f..f79810aff 100644
--- a/README.md
+++ b/README.md
@@ -12,25 +12,17 @@ Zero Waste Lviv is a Public Organization that works on the implementation of was
In order to attract attention to financial and ecological consequences of disposable diaper usage it is planned to create a module that will calculate budget spent on diapers and calculations of the future expenses. As visual representation it is planned to show the volume of waste that was made during usage of disposable diapers for one child.
- [Deployed Apps and Environments](#deployed-apps-and-environments)
+- [Required to install](#required-to-install)
- [Installation](#installation)
- - [Required to install](#Required-to-install)
- - [Clone](#Clone)
- - [Local setup](#Setup)
- - [How to run local](#How-to-run-local)
-- [Usage](#Usage)
- - [How to run Rubocop](#How-to-run-Rubocop)
- - [Git-hook pre-commit](#Git-hook-pre-commit)
+- [Usage](#usage)
+- [Contributing](#contributing)
## Deployed Apps and Environments
The latest version from the 'develop' branch is automatically deployed to stage environment in Render, [staging link](https://zero-waste-staging.onrender.com/).
The latest version from the release branch 'master' is automatically deployed to Production environment, [production link](http://calc.zerowastelviv.org.ua/).
-## Installation
-
-- Start the project locally
-
-# Required to install
+## Required to install
- Ruby 3.2.2
- Ruby on Rails 7.1.2
@@ -38,130 +30,138 @@ The latest version from the release branch 'master' is automatically deployed to
- Puma as a web server
- Yarn
- Bootstrap
+
+## Installation
-## Clone
-
-$ `git clone https://github.com/ita-social-projects/ZeroWaste.git`
-
-## Local setup
-
-First of all you need RVM to setup project. For the operating system Windows the optimal solution is to use WSL.
-
-$ `bin/setup`
-or
-$ `bundle install`
-
-Install the following packages:
-
-`sudo apt install imagemagick`
-
-`sudo apt install libvips42`
-
-PostgreSQL
-
-Install PostgreSQL for your operating system or subsystem.
-You can familiarize yourself with PostgreSQL documentation.
-
-To check if it is installed and running correctly run `sudo systemctl status postgresql`
-
-In your local machine in cloned project in config folder rename database.yml.sample to database.yml. Make sure that the user and password match the data in this file. Port may be changed.
-
-For further work, make sure that you have a user 'postgres' with superuser. If is no that one do next:
-$ `sudo -u user psql user`
-$ `CREATE USER postgres SUPERUSER;`
-$ `CREATE DATABASE postgres WITH OWNER postgres;`
-
-If you're having trouble authenticating, you may need to reset your password. You can read instruction how to do it.
-
-pg gem
-
-Under certain circumstances bundle can do not install pg.
-
-To install manually:
-$ `sudo apt-get install libpq-dev`
-then
-$ `gem install pg`
-
-Database configure
-
-For correct operation of the migration, you need to rename the migration file `20220123171144_create_versions.rb` so that it is processed first.
-
-To create the necessary databases and update them:
-
-$ `rake db:create`
-then
-$ `rake db:migrate`
-
-$ `rake db:reset` can resolve some errors connected with database.
-
-Redis
-
-You need Redis for correct work.
-Install Redis for your operating system or subsystem. You can familiarize yourself with
-Redis documentation.
-
-Installation for Ubuntu:
-
-$ `curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg`
-
-```shell
-echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
-```
-
-$ `sudo apt-get update`
-$ `sudo apt-get install redis`
-
-To check if it is installed and running correctly run `sudo systemctl status redis`
-
-npm and Node.js
-
-Also you need Node.js.
-Install npm and Node.js for your operating system or subsystem. You can familiarize yourself with
-npm and Node.js documentation
-
-yarn
-
-You can read more about yarn there:
-yarn documentation.
-
-Installation:
-$ `npm install --global yarn`
-
-Webpacker
-
-To prevent an error when starting the server install webpacker. You can read more about webpacker there:
-Webpacker documentation.
-
-Installation:
-$ `yarn add @rails/webpacker`
-$ `bundle update webpacker`
-
-Sidekiq
-
-Simple, efficient background processing for Ruby. You can read more about sidekiq there:
-Sidekiq documentation.
-
-Installation:
-$ `bundle add sidekiq`
-
-## How to run local
-
-1. Ensure that postgresql and redis are running
-2. Run `rails assets:precompile` to precompile assets
-3. Run `bin/rails tailwindcss:watch` with `rails server` to watch for changes in tailwind and start server or run `bin/dev`
-4. Open http://localhost:3000 to view it in the browser.
-
-Solutions when an errors occurs:
-psql: FATAL: role "postgres" does not exist
-
-If you have Webpacker::Manifest::MissingEntryError you can try next steps:
-$ `rm -rf node_modules`
-$ `rails webpacker:install`
-$ `yarn install`
-
-# Usage
-
-# How to run Rubocop
+ To install ZeroWaste, follow these steps:
+
+
+ on Windows
+
+ First of all you need RVM to setup project. For the operating system Windows the optimal solution is to use WSL 2.
+
+ **1. Clone the repository:**
+
+ $ `git clone https://github.com/ita-social-projects/ZeroWaste.git`
+
+ **2. Navigate to the project directory:**
+
+ $ `cd project-title`
+
+ **3. Install the following libraries for image pocessing:**
+
+ `sudo apt install imagemagick`
+
+ `sudo apt install libvips42`
+
+ **4. Install all of a project's dependencies:**
+
+ $ `bin/setup`
+ or
+ $ `bundle install`
+
+ **5. Install PostgresSQL**
+
+ To check if PostgreSQL is installed and running correctly run `sudo systemctl status postgresql`
+
+ | if PostgreSQL does not install | if PostgreSQL is instlled but not active | if PostgreSQL is installed and active |
+ | ------------- | ------------- | ------------- |
+ | Unit postgresql.service could not be found. | ● postgresql.service - PostgreSQL RDBMS Loaded: loaded (/lib/systemd/system/postgresql.service; enabled) Active: inactive (dead) since [дата і час] Docs: man:postgres(1) | ● postgresql.service - PostgreSQL RDBMS Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled) Active: active (exited) since [дата і час]Main PID: 426 (code=exited, status=0/SUCCESS) |
+ | Install PostgreSQL for your operating system or subsystem. You can familiarize yourself with PostgreSQL documentation. | run `sudo systemctl start postgresql` | Move to the next step. |
+
+ In your local machine in cloned project in config folder rename database.yml.sample to database.yml. Make sure that the user and password match the data in this file. Port may be changed.
+
+ **6. Database configure**
+
+ For further work, make sure that you have a user 'postgres' with proper password.
+ Create database:
+ $ `sudo su postgres`
+ $ `CREATE DATABASE zero_waste_development;`
+ $ `CREATE DATABASE zero_waste_test;`
+
+ If you're having trouble authenticating, you may need to reset your password. You can read instruction how to do it.
+
+ To update databases run:
+
+ $ `rake db:migrate`
+
+ $ `rake db:reset` can resolve some errors connected with database.
+
+ **7. Install Redis**
+
+ You need Redis for correct work.
+ Install Redis for your operating system or subsystem. You can familiarize yourself with
+ Redis documentation.
+
+ ```
+ curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
+
+ echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
+
+ sudo apt-get update
+ sudo apt-get install redis
+ ```
+
+ Lastly, start the Redis server like so:
+
+ $ `sudo service redis-server start`
+
+ To check if it is installed and running correctly run `sudo systemctl status redis-server`
+
+ **8. Install Yarn**
+
+ You can read more about yarn there:
+ yarn documentation.
+
+ For Windows doqnload the yarn installer.
+
+ This will give you a .msi file that when run will walk you through installing Yarn on Windows.
+
+ If you use the installer you will first need to install Node.js.
+
+ **9. Install Sidekiq**
+
+ Simple, efficient background processing for Ruby. You can read more about sidekiq there:
+ Sidekiq documentation.
+
+ Installation:
+ $ `bundle add sidekiq`
+
+ **First run**
+
+ 1. Ensure that postgresql and redis are running
+ 2. Run `rails assets:precompile` to precompile assets
+ 3. Run `bin/rails tailwindcss:watch` with `rails server` to watch for changes in tailwind and start server or run `bin/dev`
+ 4. Open http://localhost:3000 to view it in the browser.
+
+ Solutions when an errors occurs:
+ psql: FATAL: role "postgres" does not exist
+
+
+## Usage
+
+To use ZeroWaste, follow these steps:
+1. Run `bin/rails tailwindcss:watch` with `rails server` to watch for changes in tailwind
+2. Start server `rails s` or run `bin/dev`
+3. Open http://localhost:3000 to view it in the browser.
+
+## Contributing
+
+If you'd like to contribute to ZeroWaste, here are some guidelines:
+
+1. Create a new branch for your changes.
+2. Make your changes.
+3. Write tests to cover your changes.
+4. Run the tests to ensure they pass.
+5. Commit your changes.
+6. Push your changes to your forked repository.
+7. Submit a pull request.
+
+**Before commitying check your code style using [Rubocop](#rubocop)**
+
+**[Git-hoor pre-commit](#git-hook-pre-commit) will run automatically before commit**
+
+### Rubocop
Running rubocop with no arguments will check all Ruby source files in the current folder:
@@ -175,7 +175,7 @@ For more details check the available command-line options:
$ `rubocop -h`
-# Git-hook pre-commit
+### Git-hook pre-commit
Before using `git-hook-pre-commit` you need to install `sudo apt-get install cmake`
From 37b93e89a7642abcb737e45fc954339a2bb59c98 Mon Sep 17 00:00:00 2001
From: Nataliia Makarenko <73568587+NVMakarenko@users.noreply.github.com>
Date: Sat, 26 Oct 2024 18:12:36 +0300
Subject: [PATCH 2/4] Update README.md
add description for Linux installation
---
README.md | 129 ++++++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 116 insertions(+), 13 deletions(-)
diff --git a/README.md b/README.md
index f79810aff..25d93338c 100644
--- a/README.md
+++ b/README.md
@@ -64,15 +64,16 @@ The latest version from the release branch 'master' is automatically deployed to
To check if PostgreSQL is installed and running correctly run `sudo systemctl status postgresql`
- | if PostgreSQL does not install | if PostgreSQL is instlled but not active | if PostgreSQL is installed and active |
- | ------------- | ------------- | ------------- |
- | Unit postgresql.service could not be found. | ● postgresql.service - PostgreSQL RDBMS Loaded: loaded (/lib/systemd/system/postgresql.service; enabled) Active: inactive (dead) since [дата і час] Docs: man:postgres(1) | ● postgresql.service - PostgreSQL RDBMS Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled) Active: active (exited) since [дата і час]Main PID: 426 (code=exited, status=0/SUCCESS) |
- | Install PostgreSQL for your operating system or subsystem. You can familiarize yourself with PostgreSQL documentation. | run `sudo systemctl start postgresql` | Move to the next step. |
-
- In your local machine in cloned project in config folder rename database.yml.sample to database.yml. Make sure that the user and password match the data in this file. Port may be changed.
+ | Status | Next step |
+ | ------------- | ------------- |
+ | Not installed | Install PostgreSQL for your operating system or subsystem. You can familiarize yourself with PostgreSQL documentation.|
+ | Installed but inactive | Start PostgreSQL `sudo systemctl start postgresql` |
+ | Installed and avtive | Move to the next step. |
**6. Database configure**
-
+
+ In your local machine in cloned project in config folder rename database.yml.sample to database.yml. Make sure that the user and password match the data in this file. Port may be changed.
+
For further work, make sure that you have a user 'postgres' with proper password.
Create database:
$ `sudo su postgres`
@@ -120,24 +121,126 @@ The latest version from the release branch 'master' is automatically deployed to
If you use the installer you will first need to install Node.js.
**9. Install Sidekiq**
-
Simple, efficient background processing for Ruby. You can read more about sidekiq there:
- Sidekiq documentation.
-
+ Sidekiq documentation.
Installation:
$ `bundle add sidekiq`
-
- **First run**
+**First run**
1. Ensure that postgresql and redis are running
2. Run `rails assets:precompile` to precompile assets
3. Run `bin/rails tailwindcss:watch` with `rails server` to watch for changes in tailwind and start server or run `bin/dev`
- 4. Open http://localhost:3000 to view it in the browser.
+
+**Access the application**
+ Open http://localhost:3000 to view it in the browser.
Solutions when an errors occurs:
psql: FATAL: role "postgres" does not exist
+
+ on Linux
+
+ First, ensure RVM is installed for Ruby management. You can install RVM by following the official RVM installation guide. Make sure to follow any instructions for setting up your shell.
+
+ **1. Clone the repository:**
+
+ $ `git clone https://github.com/ita-social-projects/ZeroWaste.git`
+
+ **2. Navigate to the project directory:**
+
+ $ `cd project-title`
+
+ **3. Install the following libraries for image pocessing:**
+
+ `sudo apt install imagemagick`
+
+ `sudo apt install libvips42`
+
+ **4. Install all of a project's dependencies:**
+
+ $ `bin/setup`
+ or
+ $ `bundle install`
+
+ **5. Install PostgresSQL**
+
+ To check if PostgreSQL is installed and running correctly run `sudo systemctl status postgresql`
+
+ | Status | Next step |
+ | ------------- | ------------- |
+ | Not installed | Install PostgreSQL for your operating system or subsystem. You can familiarize yourself with PostgreSQL documentation.|
+ | Installed but inactive | Start PostgreSQL `sudo systemctl start postgresql` |
+ | Installed and avtive | Move to the next step. |
+
+ **6. Database configure**
+
+ In your local machine in cloned project in config folder rename database.yml.sample to database.yml. Make sure that the user and password match the data in this file. Port may be changed.
+
+ For further work, make sure that you have a user 'postgres' with proper password.
+ Create database:
+ $ `sudo su postgres`
+ $ `CREATE DATABASE zero_waste_development;`
+ $ `CREATE DATABASE zero_waste_test;`
+
+ If you're having trouble authenticating, you may need to reset your password. You can read instruction how to do it.
+
+ To update databases run:
+
+ $ `rake db:migrate`
+
+ $ `rake db:reset` can resolve some errors connected with database.
+
+ **7. Install Redis**
+
+ You need Redis for correct work.
+ Install Redis for your operating system or subsystem. You can familiarize yourself with
+ Redis documentation.
+
+ ```
+ curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
+
+ echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
+
+ sudo apt-get update
+ sudo apt-get install redis
+ ```
+
+ Lastly, start the Redis server like so:
+
+ $ `sudo service redis-server start`
+
+ To check if it is installed and running correctly run `sudo systemctl status redis-server`
+
+ **8. Install Yarn**
+
+ You can read more about yarn there:
+ yarn documentation.
+
+ For Windows doqnload the yarn installer.
+
+ This will give you a .msi file that when run will walk you through installing Yarn on Windows.
+
+ If you use the installer you will first need to install Node.js.
+
+ **9. Install Sidekiq**
+ Simple, efficient background processing for Ruby. You can read more about sidekiq there:
+ Sidekiq documentation.
+ Installation:
+ $ `bundle add sidekiq`
+
+**First run**
+ 1. Ensure that postgresql and redis are running
+ 2. Run `rails assets:precompile` to precompile assets
+ 3. Run `bin/rails tailwindcss:watch` with `rails server` to watch for changes in tailwind and start server or run `bin/dev`
+
+**Access the application**
+ Open http://localhost:3000 to view it in the browser.
+
+ Solutions when an errors occurs:
+ psql: FATAL: role "postgres" does not exist
+
+
## Usage
To use ZeroWaste, follow these steps:
From e9ec95151402fb8dccd99bbd706b7213eb9d76be Mon Sep 17 00:00:00 2001
From: Nataliia Makarenko <73568587+NVMakarenko@users.noreply.github.com>
Date: Sat, 26 Oct 2024 18:24:03 +0300
Subject: [PATCH 3/4] Update README.md
update Linux description
---
README.md | 66 +++++++++++++++++++++++++++++--------------------------
1 file changed, 35 insertions(+), 31 deletions(-)
diff --git a/README.md b/README.md
index 25d93338c..48f3c64d7 100644
--- a/README.md
+++ b/README.md
@@ -165,7 +165,14 @@ The latest version from the release branch 'master' is automatically deployed to
**5. Install PostgresSQL**
- To check if PostgreSQL is installed and running correctly run `sudo systemctl status postgresql`
+ Make sure PostgreSQL is installed and active:
+
+ ```
+ sudo apt update
+ sudo apt install postgresql postgresql-contrib
+ ```
+
+ To check if PostgreSQL is running: `sudo systemctl status postgresql`
| Status | Next step |
| ------------- | ------------- |
@@ -173,69 +180,66 @@ The latest version from the release branch 'master' is automatically deployed to
| Installed but inactive | Start PostgreSQL `sudo systemctl start postgresql` |
| Installed and avtive | Move to the next step. |
- **6. Database configure**
+ **6. Database configuration**
- In your local machine in cloned project in config folder rename database.yml.sample to database.yml. Make sure that the user and password match the data in this file. Port may be changed.
-
- For further work, make sure that you have a user 'postgres' with proper password.
- Create database:
- $ `sudo su postgres`
- $ `CREATE DATABASE zero_waste_development;`
- $ `CREATE DATABASE zero_waste_test;`
-
- If you're having trouble authenticating, you may need to reset your password. You can read instruction how to do it.
+ In the config folder, rename database.yml.sample to database.yml. Update it with your PostgreSQL username and password, and adjust the port if necessary.
+
+ To set up the database:
+
+ ```
+ sudo -u postgres psql -c "CREATE DATABASE zero_waste_development;"
+ sudo -u postgres psql -c "CREATE DATABASE zero_waste_test;"
+ ```
+
+ If you're having trouble authenticating, you may need to reset your password. You can read instruction how to do it.
- To update databases run:
+ Run Database migrations:
$ `rake db:migrate`
+
+ If issues arise, reset the database:
- $ `rake db:reset` can resolve some errors connected with database.
+ $ `rake db:reset`
**7. Install Redis**
- You need Redis for correct work.
+ Install Redis for background job processing:
Install Redis for your operating system or subsystem. You can familiarize yourself with
Redis documentation.
```
- curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
-
- echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
-
- sudo apt-get update
- sudo apt-get install redis
+ sudo apt update
+ sudo apt install redis
```
- Lastly, start the Redis server like so:
+ Start the Redis server like so:
$ `sudo service redis-server start`
- To check if it is installed and running correctly run `sudo systemctl status redis-server`
+ Verify Redis is active `sudo systemctl status redis-server`
**8. Install Yarn**
You can read more about yarn there:
yarn documentation.
-
- For Windows doqnload the yarn installer.
-
- This will give you a .msi file that when run will walk you through installing Yarn on Windows.
-
- If you use the installer you will first need to install Node.js.
**9. Install Sidekiq**
- Simple, efficient background processing for Ruby. You can read more about sidekiq there:
+
+ Sidekiq handles background processing in Ruby. Install it with:
Sidekiq documentation.
+
Installation:
+
$ `bundle add sidekiq`
**First run**
- 1. Ensure that postgresql and redis are running
+
+ 1. Confirm PostgreSQL and Redis are running.
2. Run `rails assets:precompile` to precompile assets
3. Run `bin/rails tailwindcss:watch` with `rails server` to watch for changes in tailwind and start server or run `bin/dev`
**Access the application**
- Open http://localhost:3000 to view it in the browser.
+ Open http://localhost:3000 to view ZeroWaste in the browser.
Solutions when an errors occurs:
psql: FATAL: role "postgres" does not exist
From 08002fe88b835445581ffad7ed68b7f381b3fe6f Mon Sep 17 00:00:00 2001
From: Nataliia Makarenko <73568587+NVMakarenko@users.noreply.github.com>
Date: Sat, 26 Oct 2024 18:44:03 +0300
Subject: [PATCH 4/4] Update README.md
add description for macOS installation.
---
README.md | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 108 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 48f3c64d7..aa313567f 100644
--- a/README.md
+++ b/README.md
@@ -36,7 +36,7 @@ The latest version from the release branch 'master' is automatically deployed to
To install ZeroWaste, follow these steps:
- on Windows
+ Windows
First of all you need RVM to setup project. For the operating system Windows the optimal solution is to use WSL 2.
@@ -139,8 +139,7 @@ The latest version from the release branch 'master' is automatically deployed to
- on Linux
-
+ Linux
First, ensure RVM is installed for Ruby management. You can install RVM by following the official RVM installation guide. Make sure to follow any instructions for setting up your shell.
**1. Clone the repository:**
@@ -165,7 +164,7 @@ The latest version from the release branch 'master' is automatically deployed to
**5. Install PostgresSQL**
- Make sure PostgreSQL is installed and active:
+ Ensure PostgreSQL is installed and active:
```
sudo apt update
@@ -212,7 +211,7 @@ The latest version from the release branch 'master' is automatically deployed to
sudo apt install redis
```
- Start the Redis server like so:
+ Start the Redis server:
$ `sudo service redis-server start`
@@ -232,6 +231,109 @@ The latest version from the release branch 'master' is automatically deployed to
$ `bundle add sidekiq`
+ **First run**
+
+ 1. Confirm PostgreSQL and Redis are running.
+ 2. Run `rails assets:precompile` to precompile assets
+ 3. Run `bin/rails tailwindcss:watch` with `rails server` to watch for changes in tailwind and start server or run `bin/dev`
+
+ **Access the application**
+ Open http://localhost:3000 to view ZeroWaste in the browser.
+
+ Solutions when an errors occurs:
+ psql: FATAL: role "postgres" does not exist
+
+
+
+ macOS
+
+ First, ensure RVM is installed for Ruby management. You can install RVM by following the official RVM installation guide. Make sure to follow any instructions for setting up your shell.
+
+ **1. Clone the repository:**
+
+ $ `git clone https://github.com/ita-social-projects/ZeroWaste.git`
+
+ **2. Navigate to the project directory:**
+
+ $ `cd project-title`
+
+ **3. Install the following libraries for image pocessing:**
+
+ `brew install imagemagick`
+
+ `brew install libvips42`
+
+ **4. Install all of a project's dependencies:**
+
+ $ `bin/setup`
+ or
+ $ `bundle install`
+
+ **5. Install PostgresSQL**
+
+ Ensure PostgreSQL is installed and active:
+
+ ```
+ brew install postgresql
+ ```
+
+ After installation, start PostgreSQL: `brew services start postgresql`
+
+ **6. Database configuration**
+
+ In the config folder, rename database.yml.sample to database.yml.
+
+ Update it with your PostgreSQL username and password, and adjust the port if necessary.
+
+ ```
+ psql -U postgres
+ CREATE DATABASE zero_waste_development;
+ CREATE DATABASE zero_waste_test;
+ \q
+ ```
+
+ If you're having trouble authenticating, you may need to reset your password. You can read instruction how to do it.
+
+ Run Database migrations:
+
+ $ `rake db:migrate`
+
+ If issues arise, reset the database:
+
+ $ `rake db:reset`
+
+ **7. Install Redis**
+
+ Install Redis for background tasks processing:
+ Install Redis for your operating system or subsystem. You can familiarize yourself with
+ Redis documentation.
+
+ ```
+ brew install redis
+ ```
+
+ Start the Redis service:
+
+ $ `brew services start redis`
+
+ **8. Install Yarn**
+
+ You can read more about yarn there:
+ yarn documentation.
+
+ Install Yarn using Homebrew. You may need Node.js as well if it’s not installed.
+
+ `brew install yarn`
+
+ **9. Install Sidekiq**
+
+ Sidekiq handles background processing in Ruby. Install it with:
+ Sidekiq documentation.
+
+ Installation:
+
+ $ `bundle add sidekiq`
+
**First run**
1. Confirm PostgreSQL and Redis are running.
@@ -245,6 +347,7 @@ The latest version from the release branch 'master' is automatically deployed to
psql: FATAL: role "postgres" does not exist
+
## Usage
To use ZeroWaste, follow these steps: