Install Discourse on macOS for development

Hi,I am installing on m1 Monterey and need some help.

After bundle install is completed, when doing db create, I have the following error saying symbol not found in flat namespace '___aarch64_ldadd4_acq_rel':

bundle exec rake db:create
rake aborted!
LoadError: dlopen(/Users/$USERID/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/rbtrace-0.4.14/lib/rbtrace.bundle, 0x0009): symbol not found in flat namespace '___aarch64_ldadd4_acq_rel' - /Users/$USERID/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/rbtrace-0.4.14/lib/rbtrace.bundle
/Users/$USERID/discourse/config/environments/development.rb:80:in `block in <main>'
/Users/$USERID/discourse/config/environments/development.rb:3:in `<main>'
/Users/$USERID/discourse/config/environment.rb:7:in `<main>'
/Users/$USERID/.rbenv/versions/2.7.3/bin/bundle:25:in `load'
/Users/$USERID/.rbenv/versions/2.7.3/bin/bundle:25:in `<main>'
Tasks: TOP => db:create => db:load_config => environment
(See full trace by running task with --trace)


1 Like

When executing this:

I got this error:

MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. ( Redis::CommandError )

Fix this by restarting Redis:

brew services restart redis

and you’ll be fine.


look good! :slight_smile: thank you very much

1 Like

My database creation failed:

connection to server on socket "/tmp/.s.PGSQL.5432" failed: fe_sendauth: no password supplied
Couldn't create 'discourse_development' database. Please check your configuration.

Do I need to provide the user and password for my PostGresql db?

1 Like

it’s been a while so you probably got it working, but for anyone that has the same problem you have to have imagemagick and can use brew install imagemagick like described here

1 Like

A suggestion:

I think there’s value adding this bit in the original guide, since it is a major dependency :thinking:

I was setting up Discourse on a fresh install of Big Sur. When I run bin/ember-cli, I realised that I haven’t installed node yet. From experience, I could figure out what to do. However I imagined a much younger me would not be able to figure it out immediately, and could be a source of unnecessary frustration(s) :pensive:

Something like this?:

Starting with Discourse 2.5+ EmberCLI is required in development and these additional steps will be required:

Open a separate terminal instance.

If you don’t have node, install it is by running:

brew install node

Navigate to your discourse folder (cd ~/discourse) and run:


You should now be able to navigate to http://localhost:4200 to see your local Discourse installation.


2 posts were merged into an existing topic: Beginners Guide to Install Discourse on Ubuntu for Development

When I first followed these directions and ran bundle exec rake db:migrate I received the following error:

rake aborted!
Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/daniel/workspace/discourse/app/assets/javascripts/node_modules/xss/dist/xss.min.js
/Users/daniel/workspace/discourse/lib/pretty_text.rb:612:in `block in ctx_load'
/Users/daniel/workspace/discourse/lib/pretty_text.rb:611:in `each'
/Users/daniel/workspace/discourse/lib/pretty_text.rb:611:in `ctx_load'
/Users/daniel/workspace/discourse/lib/pretty_text.rb:108:in `create_es6_context'
/Users/daniel/workspace/discourse/lib/pretty_text.rb:152:in `block in v8'
/Users/daniel/workspace/discourse/lib/pretty_text.rb:150:in `synchronize'
/Users/daniel/workspace/discourse/lib/pretty_text.rb:150:in `v8'
/Users/daniel/workspace/discourse/lib/pretty_text.rb:304:in `block in escape_emoji'
/Users/daniel/workspace/discourse/lib/pretty_text.rb:605:in `block in protect'
/Users/daniel/workspace/discourse/lib/pretty_text.rb:604:in `synchronize'
/Users/daniel/workspace/discourse/lib/pretty_text.rb:604:in `protect'
/Users/daniel/workspace/discourse/lib/pretty_text.rb:303:in `escape_emoji'
/Users/daniel/workspace/discourse/app/models/emoji.rb:222:in `unicode_unescape'
/Users/daniel/workspace/discourse/app/models/topic.rb:458:in `fancy_title'
/Users/daniel/workspace/discourse/app/models/topic.rb:347:in `block in <class:Topic>'
/Users/daniel/workspace/discourse/app/models/category.rb:300:in `block in create_category_definition'
/Users/daniel/workspace/discourse/app/models/category.rb:295:in `create_category_definition'
/Users/daniel/workspace/discourse/lib/seed_data/categories.rb:114:in `create_category'
/Users/daniel/workspace/discourse/lib/seed_data/categories.rb:15:in `block (2 levels) in create'
/Users/daniel/workspace/discourse/lib/seed_data/categories.rb:15:in `each'
/Users/daniel/workspace/discourse/lib/seed_data/categories.rb:15:in `block in create'
/Users/daniel/workspace/discourse/lib/seed_data/categories.rb:14:in `create'
(eval):6:in `block (2 levels) in run_file'
/Users/daniel/workspace/discourse/lib/tasks/db.rake:152:in `block (2 levels) in <main>'
/Users/daniel/workspace/discourse/lib/distributed_mutex.rb:57:in `block in synchronize'
/Users/daniel/workspace/discourse/lib/distributed_mutex.rb:53:in `synchronize'
/Users/daniel/workspace/discourse/lib/distributed_mutex.rb:53:in `synchronize'
/Users/daniel/workspace/discourse/lib/distributed_mutex.rb:38:in `synchronize'
/Users/daniel/workspace/discourse/lib/tasks/db.rake:132:in `block in <main>'
/Users/daniel/.rbenv/versions/2.7.3/bin/bundle:25:in `load'
/Users/daniel/.rbenv/versions/2.7.3/bin/bundle:25:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

To resolve this issue I did have to run yarn install before the command.

1 Like

Your bundle is locked to webmock (3.16.0) from rubygems repository or installed locally, but that
version can no longer be found in that source. That means the author of webmock (3.16.0) has removed it. You’ll need to
update your bundle to a version other than webmock (3.16.0) that hasn’t been removed in order to install.

edit: (seems to big a bigger problem here, my bundler says the ruby version is too old and then i update my ruby and it still says it’s old)


I have the same issue. Were you able to resolve this @astro?

1 Like

Please share the output of ruby -v and which ruby on your terminal.


Oops, developer error on this one :man_facepalming:

I didn’t realize I was on a branch that was likely well behind the docker images. After switching to a current branch, I’m good. Hope this helps you out @astro.

1 Like

If you ever encounter a postgresql error starting up your rails server like this
Library not loaded: /opt/homebrew/opt/postgresql/lib/libpq.5.dylib
or (no such file), ‘/usr/local/lib/libpq.5.dylib’

gem uninstall pg
bundle install