forem / forem

For empowering community 🌱
https://forem.com
GNU Affero General Public License v3.0
22.01k stars 4.05k forks source link

Dip & Docker Install Lacks Hypershield Schema #21277

Open maurice-does-software opened 2 months ago

maurice-does-software commented 2 months ago

Describe the bug When I tried installing Forem using the docker and dip strategy, it seems to succeed until this point:

[hypershield] Refreshing schemas
rails aborted!
ActiveRecord::StatementInvalid: PG::InvalidSchemaName: ERROR:  schema "hypershield" does not exist (ActiveRecord::StatementInvalid)
/app/lib/tasks/app_initializer.rake:6:in `block (2 levels) in <main>'

Caused by:
PG::InvalidSchemaName: ERROR:  schema "hypershield" does not exist (PG::InvalidSchemaName)
/app/lib/tasks/app_initializer.rake:6:in `block (2 levels) in <main>'
Tasks: TOP => hypershield:refresh
(See full trace by running task with --trace)

== Command ["bin/rails app_initializer:setup forem:setup"] failed ==
ERROR: Command 'dip bash -c bin/setup' executed with error

To Reproduce

Follow these steps: https://developers.forem.com/getting-started/installation/containers#installation-1 Step 4 (dip provision) is what fails, after having created and started all the containers, and run migrations.

Expected behavior No error message, and I can go to step 5, dip rails s and run Forem.

Desktop (please complete the following information):

Additional context

Since the failing rake task was hypershield:refresh, I tried running dip rails hypershield:refresh:dry_run as a diagnostic, since the hypershield gem's own readme mentions that. It succeeded. So then I tried manually invoking the actual refresh task again with dip rails hypershield:refresh, and it failed again with the same error. I don't know how to get past this point.

github-actions[bot] commented 2 months ago

Thanks for the issue, we will take it into consideration! Our team of engineers is busy working on many types of features, please give us time to get back to you.

To our amazing contributors: issues labeled bug are always up for grabs, but for feature requests, please wait until we add a ready for dev before starting to work on it.

If this is a feature request from an external contributor (not core team at Forem), please close the issue and re-post via GitHub Discussions.

To claim an issue to work on, please leave a comment. If you've claimed the issue and need help, please ping @forem-team. The OSS Community Manager or the engineers on OSS rotation will follow up.

For full info on how to contribute, please check out our contributors guide.

yousefmarey12 commented 3 weeks ago

Hey @maurice-does-software , I'll try to tackle this issue.

yousefmarey12 commented 3 weeks ago

@maurice-does-software , so here is my intake. I tried to reproduce the issue with Debian 12, but I couldn't reproduce it. The first I received a different error, and it worked the second time. Since it's not reproducing, I cannot submit a PR. With that said, I'll provide my steps as I also had to use Getting Started Forem Linux:

First Install System Level Dependencies the code below:

sudo apt update
sudo apt install -y imagemagick curl build-essential pkg-config libssl-dev libz-dev libreadline-dev libcurl4-openssl-dev uuid-dev icu-devtools

Then, move onto the Getting Started Forem Containers.

For step 2, use Rbenv instead of mise.

If that works, let me know.

Here's a suggestion in case it doesn't work:

Type psql --version on the command line. If you get something move onto suggestion 2. If not, then PostgreSQL is not initialized and that is a problem.

Let me know the outcome, and I will follow up as necassary.