התקן Discourse ב-macOS לפיתוח

אני מנסה כל היום לעשות את זה אבל לא מצליח.

כרגע תקוע בשלב הזה, כאשר אני משתמש ב-bundle install אני מקבל את השגיאות הבאות:

compiling cppjieba_rb.c
compiling internal.cc make: *** [internal.o] Error 1
make failed, exit code 2
An error occurred while installing cppjieba_rb (0.4.4), and Bundler cannot continue.

אני משתמש ב-M4 MacBook Pro. כל עזרה מוערכת!

Just finished setting up a dev environment from scratch on a factory-reset MacBook. I used Homebrew for everything I could. Not saying this is the best approach, but that’s my step-by-step:

If new installs don’t show, update shell during steps source .zprofile

Install dependencies with Homebrew

brew install git
brew install rbenv

rbenv install ruby 3.4.6
rbenv global 3.4.6
ruby --version

gem update
gem install rails
rails --version

brew install postgresql@14 pgvector
brew services start postgresql
brew install redis
brew services start redis
brew install nvm (see nvm — Homebrew Formulae for shell profile adjustments)

nvm --version
nvm install 22
node -v

brew install pnpm

Install Discourse

Same as op, starting at Clone Discourse


postgres errors

Postgres installation seems a bit fragile. Apparently you can end up with corrupted files and a rather easy approach then is to delete them and install again:

brew uninstall postgresql@14
rm -rf /opt/homebrew/var/postgresql@14
brew install postgresql@14
brew services start postgresql@14
4 לייקים