From 2f9185931331f850c063af47e4087c969a361700 Mon Sep 17 00:00:00 2001 From: Mir Bhatia Date: Wed, 4 Sep 2024 13:09:14 +0200 Subject: [PATCH 1/9] Update README.md --- docs/development/development-environment/macos/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/development/development-environment/macos/README.md b/docs/development/development-environment/macos/README.md index 5d1ed3b0e16c..5ed7ee44aa9b 100644 --- a/docs/development/development-environment/macos/README.md +++ b/docs/development/development-environment/macos/README.md @@ -75,10 +75,11 @@ steps. ```shell # Install postgres database -$ brew install postgres +$ brew install postgresql -# Create the database instance -$ postgres -D /usr/local/var/postgres +# Confirm that postgres has created a default database cluster if you see +This formula has created a default database cluster with: + initdb --locale=C -E UTF-8 /opt/homebrew/var/postgresql@14 # /usr/local for Intel Macs ``` Then, create the OpenProject database user and accompanied database. From 663b0ecfb935560c3d2d40911414cc632f31a49b Mon Sep 17 00:00:00 2001 From: Tobias Dillmann Date: Thu, 5 Sep 2024 08:50:23 +0200 Subject: [PATCH 2/9] Readme: database connection instructions gssencmode: disabled is required, or else Ruby will crash :( --- docs/development/development-environment/macos/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/development/development-environment/macos/README.md b/docs/development/development-environment/macos/README.md index 5ed7ee44aa9b..80ab5cb9ee49 100644 --- a/docs/development/development-environment/macos/README.md +++ b/docs/development/development-environment/macos/README.md @@ -173,6 +173,10 @@ It should look like this (just with your database name, username, and password): default: &default adapter: postgresql encoding: unicode + # Socket encryption must be disabled on macOS. There is an old bug in which forked processes cause problems on a Mac. + # TL;DR: set this flag, otherwise Ruby will crash whenever a route is accessed. + # Visit https://github.com/ged/ruby-pg/issues/311 to enter the rabbit hole. + gssencmode: disable host: localhost username: openproject password: openproject-dev-password From 14b1352f7fbe5ce3d5f82b32d099ac8fcfb63b76 Mon Sep 17 00:00:00 2001 From: Tobias Dillmann Date: Thu, 5 Sep 2024 08:51:34 +0200 Subject: [PATCH 3/9] Readme: imagemagick and java installation This will be required for OpenProject to fully work. The hints to install these is there, but in other places of the docs. I think it makes sense to add them here. Doesn't hurt to install everything at once. --- .../development-environment/macos/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/development/development-environment/macos/README.md b/docs/development/development-environment/macos/README.md index 80ab5cb9ee49..0c6bb5e95e5c 100644 --- a/docs/development/development-environment/macos/README.md +++ b/docs/development/development-environment/macos/README.md @@ -194,6 +194,20 @@ To configure the environment variables such as the number of web server threads the `.env.example` to `.env` and add the environment variables you want to configure. The variables will be automatically loaded to the application's environment. +### Install other requirements + +Some operations in OpenProject require additional software. These include PDF exports and interaction with an +LDAP server. + +In order to have OpenProject behave correctly, you need to install `imagemagick` and `java`. + +```shell +brew install imagemagick java +``` + +As of writing, you need to manually create a symlink to OpenJDK for the Java installation to take effect. Homebrew will +tell you how. + ### Finish the Installation of OpenProject Install code dependencies, link plugin modules and export translation files. From 8fbd88c9f4a6b170065789c568b3a41f6c05768d Mon Sep 17 00:00:00 2001 From: Tobias Dillmann Date: Thu, 5 Sep 2024 08:52:52 +0200 Subject: [PATCH 4/9] README: Mac OS X -> macOS Unfortunately, we cannot update the headline, too. This would break links. --- docs/development/development-environment/macos/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/development-environment/macos/README.md b/docs/development/development-environment/macos/README.md index 0c6bb5e95e5c..9bb18c1cc1e8 100644 --- a/docs/development/development-environment/macos/README.md +++ b/docs/development/development-environment/macos/README.md @@ -10,7 +10,7 @@ keywords: development setup macos To develop OpenProject a setup similar to that for using OpenProject in production is needed. -This guide assumes that you have a Mac OS X installation with administrative rights. +This guide assumes that you have a macOS (used to be called Mac OS X) installation with administrative rights. OpenProject will be installed with a PostgreSQL database. **Please note**: This guide is NOT suitable for a production setup, but only for developing with it! From 5fa15b1622d9e13a77381099e0cf3461038f54d0 Mon Sep 17 00:00:00 2001 From: Mir Bhatia Date: Thu, 5 Sep 2024 12:20:23 +0200 Subject: [PATCH 5/9] Incorporate suggestions --- docs/development/development-environment/macos/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/development/development-environment/macos/README.md b/docs/development/development-environment/macos/README.md index 9bb18c1cc1e8..c8e630abaecf 100644 --- a/docs/development/development-environment/macos/README.md +++ b/docs/development/development-environment/macos/README.md @@ -10,7 +10,7 @@ keywords: development setup macos To develop OpenProject a setup similar to that for using OpenProject in production is needed. -This guide assumes that you have a macOS (used to be called Mac OS X) installation with administrative rights. +This guide assumes that you have a macOS installation with administrative rights. OpenProject will be installed with a PostgreSQL database. **Please note**: This guide is NOT suitable for a production setup, but only for developing with it! @@ -199,7 +199,7 @@ automatically loaded to the application's environment. Some operations in OpenProject require additional software. These include PDF exports and interaction with an LDAP server. -In order to have OpenProject behave correctly, you need to install `imagemagick` and `java`. +In order to develop OpenProject in these areas, you need to install `imagemagick` and `java`. ```shell brew install imagemagick java From e0862db5e3a90016628681151d537bc0c1cc682b Mon Sep 17 00:00:00 2001 From: Tobias Dillmann Date: Thu, 5 Sep 2024 13:00:26 +0200 Subject: [PATCH 6/9] Use macOS in headline --- docs/development/development-environment/macos/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/development-environment/macos/README.md b/docs/development/development-environment/macos/README.md index c8e630abaecf..abdb9afce04f 100644 --- a/docs/development/development-environment/macos/README.md +++ b/docs/development/development-environment/macos/README.md @@ -6,7 +6,7 @@ description: OpenProject development setup on Mac OS keywords: development setup macos --- -# OpenProject development setup on Mac OS X +# OpenProject development setup on macOS To develop OpenProject a setup similar to that for using OpenProject in production is needed. From 2b20dddf295afb41519a0c3e0408e9aadf616a6c Mon Sep 17 00:00:00 2001 From: Tobias Dillmann Date: Fri, 6 Sep 2024 08:46:25 +0200 Subject: [PATCH 7/9] macOS dev guide: add Shell profile instructions --- docs/development/development-environment/macos/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/development/development-environment/macos/README.md b/docs/development/development-environment/macos/README.md index abdb9afce04f..7e1bbb397e46 100644 --- a/docs/development/development-environment/macos/README.md +++ b/docs/development/development-environment/macos/README.md @@ -194,6 +194,13 @@ To configure the environment variables such as the number of web server threads the `.env.example` to `.env` and add the environment variables you want to configure. The variables will be automatically loaded to the application's environment. +> [!TIP] +> Instead of using the `gssencmode` flag in `config/database.yml`, you can add `export PGGSSENCMODE="disable"` to your +> Shell profile (`~/.zprofile` by default). This will prevent Ruby crashes for *all* of your projects. +> +> However, some users report Ruby crashes despite having setting this flag to disable. +> If this happens on your machine, try adding `export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=yes` to your Shell profile. + ### Install other requirements Some operations in OpenProject require additional software. These include PDF exports and interaction with an From 80aeca78dfc459f815089abeb8391a301592b0da Mon Sep 17 00:00:00 2001 From: Tobias Dillmann Date: Fri, 6 Sep 2024 08:49:02 +0200 Subject: [PATCH 8/9] Readme: fix typo --- docs/development/development-environment/macos/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/development-environment/macos/README.md b/docs/development/development-environment/macos/README.md index 7e1bbb397e46..99a44012e0cb 100644 --- a/docs/development/development-environment/macos/README.md +++ b/docs/development/development-environment/macos/README.md @@ -198,7 +198,7 @@ automatically loaded to the application's environment. > Instead of using the `gssencmode` flag in `config/database.yml`, you can add `export PGGSSENCMODE="disable"` to your > Shell profile (`~/.zprofile` by default). This will prevent Ruby crashes for *all* of your projects. > -> However, some users report Ruby crashes despite having setting this flag to disable. +> However, some users report Ruby crashes despite having set this flag to disable. > If this happens on your machine, try adding `export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=yes` to your Shell profile. ### Install other requirements From c57d025b55174f8221cb2375145ca51e7094f33a Mon Sep 17 00:00:00 2001 From: Tobias Dillmann Date: Fri, 6 Sep 2024 14:43:29 +0200 Subject: [PATCH 9/9] Readme: better wording --- docs/development/development-environment/macos/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/development/development-environment/macos/README.md b/docs/development/development-environment/macos/README.md index 99a44012e0cb..279b6b71aa87 100644 --- a/docs/development/development-environment/macos/README.md +++ b/docs/development/development-environment/macos/README.md @@ -197,9 +197,9 @@ automatically loaded to the application's environment. > [!TIP] > Instead of using the `gssencmode` flag in `config/database.yml`, you can add `export PGGSSENCMODE="disable"` to your > Shell profile (`~/.zprofile` by default). This will prevent Ruby crashes for *all* of your projects. -> -> However, some users report Ruby crashes despite having set this flag to disable. -> If this happens on your machine, try adding `export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=yes` to your Shell profile. + +Some users report Ruby crashes despite having set this flag to disable. If this is the case for you as well, +try adding `export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=yes` to your Shell profile. ### Install other requirements