Discourse Ember CLI Proxy Error

Discourse Ember CLI Proxy Error

FetchError: request to http://127.0.0.1:3000/ failed, reason: connect ECONNREFUSED 127.0.0.1:3000
    at ClientRequest. (file:///home/xxx/discourse/node_modules/.pnpm/node-fetch@3.3.2/node_modules/node-fetch/src/index.js:108:11)
    at ClientRequest.emit (node:events:524:28)
    at emitErrorEvent (node:_http_client:101:11)
    at Socket.socketErrorListener (node:_http_client:504:5)
    at Socket.emit (node:events:524:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

How to fix the error?

Thanks

Is this a standard install? A development install?

Follow the guide Install Discourse on Ubuntu or Debian for Development

You need to have the rails server running.

Or you can use -u to run both.

1 Like

Consider Developing Discourse using a Dev Container. Say more about what you did. Did you start rails?

1 Like

I, [2025-07-22T11:01:04.131140 #169405] INFO – : listening on addr=127.0.0.1:3000 fd=28
[ember-cli] …[@embroider/webpack]
#<Thread:0x00007f3f66f43c18 /home/xxx/discourse/lib/discourse.rb:1189 run> terminated with exception (report_on_exception is true):
/home/xxx/discourse/lib/letter_avatar.rb:112:in ‘Kernel#': No such file or directory - magick (Errno::ENOENT) from /home/xxx/discourse/lib/letter_avatar.rb:112:in 'LetterAvatar.image_magick_version' from /home/xxx/discourse/lib/discourse.rb:1189:in 'block in Discourse.preload_rails!' E, [2025-07-22T11:01:14.236992 #169405] ERROR -- : No such file or directory - magick (Errno::ENOENT) /home/xxx/discourse/lib/letter_avatar.rb:112:in 'Kernel#
/home/xxx/discourse/lib/letter_avatar.rb:112:in ‘LetterAvatar.image_magick_version’
/home/xxx/discourse/lib/discourse.rb:1189:in ‘block in Discourse.preload_rails!’
[bin/ember-cli] unicorn process stopped. Terminating ember-cli.

Did you do something like:

cd ~/discourse
./bin/rails s

You need to do that in another terminal before running ./bin/ember-cli

Make sure the right version of imagemagick is installed.

2 Likes

Looks like good advice. Here’s how I do that. It assumes you’ve got asdf and docker.

  IMAGE_MAGICK_VERSION=$(docker run discourse/base:release bash -c 'magick --version'|head -1|cut -d' ' -f3)
  echo "Got IMAGE_MAGICK_VERSION: $IMAGE_MAGICK_VERSION"
  asdf install imagemagick $IMAGE_MAGICK_VERSION 2>&1 |grep -v "already"
  echo "installed imagemagic, now set global"
  asdf global imagemagick $IMAGE_MAGICK_VERSION 2>&1 |grep -v "already"
  echo "global done."
1 Like