From 13f387e0a4b8778741f524df325525e14218cfbf Mon Sep 17 00:00:00 2001 From: Pauloparakleto Date: Tue, 19 Mar 2024 16:17:27 -0300 Subject: [PATCH 1/8] chore(README.md): change the order the instalation guide appears. Make clear ruby and node versions must be checked bebore running the script --- GETTING_STARTED.md | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index 65b8cca69d..0be05bdb65 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -6,28 +6,9 @@ This is a general guide to setting up an Open Food Network **development environ Head to our wiki on [Learning Rails](https://github.com/openfoodfoundation/openfoodnetwork/wiki/Learning-Rails) to find some good starting points. -### Requirements - -The fastest way to make it work locally is to use Docker, you only need to setup git, see the [Docker setup guide](docker/README.md). -Otherwise, for a local setup you will need: -* Ruby and bundler (check current Ruby version in [.ruby-version](https://github.com/openfoodfoundation/openfoodnetwork/blob/master/.ruby-version) file) - - To manage versions, it's recommended to use [rbenv](https://github.com/rbenv/rbenv) or [RVM](https://rvm.io/) -* Node and yarn (check current Node version in [.node-version](https://github.com/openfoodfoundation/openfoodnetwork/blob/master/.node-version) file) - - [nodevn](https://github.com/nodenv/nodenv) is recommended. -* PostgreSQL database -* Redis (for background jobs) -* Chrome (for testing) - -The following guides will provide OS-specific step-by-step instructions to get these requirements installed: -- [Ubuntu Setup Guide][ubuntu] -- [Debian Setup Guide][debian] -- [OSX Setup Guide][osx] - -For those new to Rails, the following tutorial will help get you up to speed with configuring a [Rails environment](http://guides.rubyonrails.org/getting_started.html). - ### Get it -So you have set up your local environment according to the requirements listed above. If you're planning on contributing code to the project (which we [LOVE](CONTRIBUTING.md)), it is a good idea to begin by forking this repo using the `Fork` button in the top-right corner of this screen. You should then be able to use `git clone` to copy your fork onto your local machine: +If you're planning on contributing code to the project (which we [LOVE](CONTRIBUTING.md)), it is a good idea to begin by forking this repo using the `Fork` button in the top-right corner of this screen. You should then be able to use `git clone` to copy your fork onto your local machine: git clone git@github.com:YOUR_GITHUB_USERNAME_HERE/openfoodnetwork.git @@ -43,6 +24,25 @@ Fetch the latest version of `master` from `upstream` (ie. the main repo): git fetch upstream master +### Instalation + +This project needs specific ruby/bundler versions as well as node/yarn specific versions. For a local setup you will need: + +* Install or change your Ruby version according to the one specified at [.ruby-version](https://github.com/openfoodfoundation/openfoodnetwork/blob/master/.ruby-version) file) + - To manage versions, it's recommended to use [rbenv](https://github.com/rbenv/rbenv) or [RVM](https://rvm.io/) +* Install or change Node version according to the one specified at [.node-version](https://github.com/openfoodfoundation/openfoodnetwork/blob/master/.node-version) + - [nodevn](https://github.com/nodenv/nodenv) is recommended as a node version manager. +* PostgreSQL database +* Redis (for background jobs) +* Chrome (for testing) + +The following guides will provide OS-specific step-by-step instructions to get these requirements installed: +- [Ubuntu Setup Guide][ubuntu] +- [Debian Setup Guide][debian] +- [OSX Setup Guide][osx] + +For those new to Rails, the following tutorial will help get you up to speed with configuring a [Rails environment](http://guides.rubyonrails.org/getting_started.html). + ### Get it running First, you need to create the database user the app will use by manually typing the following in your terminal: @@ -53,7 +53,8 @@ sudo --login --user=postgres psql -c "CREATE USER ofn WITH SUPERUSER CREATEDB PA This will create the "ofn" user as superuser and allowing it to create databases. If this command fails, check the [troubleshooting section](#creating-the-database) for an alternative. -Next, it is _strongly recommended_ to run the setup script. +Next, it is _strongly recommended_ to run the setup script. This script assumes your ruby version manager is [rbenv](https://github.com/rbenv/rbenv). Make sure ruby and node versions match the project requirements and run: + ```sh ./script/setup ``` From eb7e65a707bd4463e54ab6c5cc3c98e080d05ab5 Mon Sep 17 00:00:00 2001 From: Pauloparakleto Date: Wed, 20 Mar 2024 10:33:08 -0300 Subject: [PATCH 2/8] chore(GETTING_STARTED.md): remove mention to RVM --- GETTING_STARTED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index 0be05bdb65..7ecc0299e2 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -29,7 +29,7 @@ Fetch the latest version of `master` from `upstream` (ie. the main repo): This project needs specific ruby/bundler versions as well as node/yarn specific versions. For a local setup you will need: * Install or change your Ruby version according to the one specified at [.ruby-version](https://github.com/openfoodfoundation/openfoodnetwork/blob/master/.ruby-version) file) - - To manage versions, it's recommended to use [rbenv](https://github.com/rbenv/rbenv) or [RVM](https://rvm.io/) + - To manage versions, it's recommended to use [rbenv](https://github.com/rbenv/rbenv). * Install or change Node version according to the one specified at [.node-version](https://github.com/openfoodfoundation/openfoodnetwork/blob/master/.node-version) - [nodevn](https://github.com/nodenv/nodenv) is recommended as a node version manager. * PostgreSQL database From ccdd428b5755ae7dbf48e476f1199cbfe6e48462 Mon Sep 17 00:00:00 2001 From: Pauloparakleto Date: Wed, 20 Mar 2024 10:45:24 -0300 Subject: [PATCH 3/8] chore(GETTING_STARTED.md): Mention docker at the bottom of the section preventing the contributor about aditional steps --- GETTING_STARTED.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index 7ecc0299e2..51827d64f9 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -43,6 +43,8 @@ The following guides will provide OS-specific step-by-step instructions to get t For those new to Rails, the following tutorial will help get you up to speed with configuring a [Rails environment](http://guides.rubyonrails.org/getting_started.html). +Another way to make it work locally would be using Docker. See the [Docker setup guide](docker/README.md). You will need to setup git and others aditional steps. + ### Get it running First, you need to create the database user the app will use by manually typing the following in your terminal: From cb47624702ea2063040c454fe533dd935659b332 Mon Sep 17 00:00:00 2001 From: Pauloparakleto Date: Wed, 20 Mar 2024 10:48:02 -0300 Subject: [PATCH 4/8] chore(GETTING_STARTED.md): fix spelling --- GETTING_STARTED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index 51827d64f9..c093b48305 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -24,7 +24,7 @@ Fetch the latest version of `master` from `upstream` (ie. the main repo): git fetch upstream master -### Instalation +### Installation This project needs specific ruby/bundler versions as well as node/yarn specific versions. For a local setup you will need: From d81fc44597ab5acaeff55143fcc9e996032504f6 Mon Sep 17 00:00:00 2001 From: Pauloparakleto Date: Wed, 20 Mar 2024 11:03:16 -0300 Subject: [PATCH 5/8] chore(GETTING_STARTED.md): change instruction to nodenv, make it mandatory. --- GETTING_STARTED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index c093b48305..3c39868bb1 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -30,7 +30,7 @@ This project needs specific ruby/bundler versions as well as node/yarn specific * Install or change your Ruby version according to the one specified at [.ruby-version](https://github.com/openfoodfoundation/openfoodnetwork/blob/master/.ruby-version) file) - To manage versions, it's recommended to use [rbenv](https://github.com/rbenv/rbenv). -* Install or change Node version according to the one specified at [.node-version](https://github.com/openfoodfoundation/openfoodnetwork/blob/master/.node-version) +* Install [nodenv](https://github.com/nodenv/nodenv) to ensure the correct [.node-version](https://github.com/openfoodfoundation/openfoodnetwork/blob/master/.node-version) is used. - [nodevn](https://github.com/nodenv/nodenv) is recommended as a node version manager. * PostgreSQL database * Redis (for background jobs) From 1e826e8308dc91558886534310dfb8995e8e7be0 Mon Sep 17 00:00:00 2001 From: Pauloparakleto Date: Wed, 20 Mar 2024 11:37:52 -0300 Subject: [PATCH 6/8] chore(GETTING_STARTED.md): close parentheses --- GETTING_STARTED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index 3c39868bb1..39223f53ac 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -28,7 +28,7 @@ Fetch the latest version of `master` from `upstream` (ie. the main repo): This project needs specific ruby/bundler versions as well as node/yarn specific versions. For a local setup you will need: -* Install or change your Ruby version according to the one specified at [.ruby-version](https://github.com/openfoodfoundation/openfoodnetwork/blob/master/.ruby-version) file) +* Install or change your Ruby version according to the one specified at [.ruby-version](https://github.com/openfoodfoundation/openfoodnetwork/blob/master/.ruby-version) file. - To manage versions, it's recommended to use [rbenv](https://github.com/rbenv/rbenv). * Install [nodenv](https://github.com/nodenv/nodenv) to ensure the correct [.node-version](https://github.com/openfoodfoundation/openfoodnetwork/blob/master/.node-version) is used. - [nodevn](https://github.com/nodenv/nodenv) is recommended as a node version manager. From 2d8cd2b1a5638a0432c6c03a6296b91bdc9dce23 Mon Sep 17 00:00:00 2001 From: Pauloparakleto Date: Wed, 20 Mar 2024 11:43:43 -0300 Subject: [PATCH 7/8] chore(GETTING_STARTED.md): remove redundant advise about rbenv and node version --- GETTING_STARTED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index 39223f53ac..b0414f0cea 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -55,7 +55,7 @@ sudo --login --user=postgres psql -c "CREATE USER ofn WITH SUPERUSER CREATEDB PA This will create the "ofn" user as superuser and allowing it to create databases. If this command fails, check the [troubleshooting section](#creating-the-database) for an alternative. -Next, it is _strongly recommended_ to run the setup script. This script assumes your ruby version manager is [rbenv](https://github.com/rbenv/rbenv). Make sure ruby and node versions match the project requirements and run: +Next, it is _strongly recommended_ to run the setup script: ```sh ./script/setup From e85e6066676d60cfbea2049ba691581fd18c046f Mon Sep 17 00:00:00 2001 From: Pauloparakleto Date: Wed, 20 Mar 2024 18:35:40 -0300 Subject: [PATCH 8/8] chore(GETTING_STARTED.md): remove mention to git and aditional steps when mentioning docker alternative. Let docker section be its job --- GETTING_STARTED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index b0414f0cea..461aa86f53 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -43,7 +43,7 @@ The following guides will provide OS-specific step-by-step instructions to get t For those new to Rails, the following tutorial will help get you up to speed with configuring a [Rails environment](http://guides.rubyonrails.org/getting_started.html). -Another way to make it work locally would be using Docker. See the [Docker setup guide](docker/README.md). You will need to setup git and others aditional steps. +Another way to make it work locally would be using Docker. See the [Docker setup guide](docker/README.md). ### Get it running