Install imagemagik manually, the latest version (make sure you go to the " Install latest version of ImageMagick from the source code (for advanced and desperate users)" section: https://itsfoss.com/install-imagemagick-ubuntu
Only after all of this was I able to log on to the instance….
So after spending the entire day getting the dev instance up and running, I was pretty pleased…everything seems to be ok, except uploading avatars. Specifically, as a user I can upload an avatar and in the avatar upload box it shows correctly, but when I click save it just displays the placeholder avatar…..no errors in log…
this is quite important to me as I set up the dev instance to test a migration and one of those tests is that it gets avatars …so I want to make sure they work before going ahead with a test import.
Uploaded images in topics appear correctly, no issue
Make sure you are starting your local server with FORCE_HOSTNAME=localhost:4200 bin/ember-cli -u
It’s better to use a test instance in the cloud to mimic your final destination … in fact, I would recommend you test migrations in the cloud ultimately.
I’m so tired after spending the entire day getting this local dev environment to where it is, I can’t bring myself to think it was all pointless now thought I was there!
My thought process for a local dev environment was:
run the import script locally, backup discord, put it on the proper cloud production instance when all looks good…
First problem - avatar path was ip address 127.0.0.1 whereas all the other urls were localhost - would that make a difference? I changed it anyway, by going into rails c (as it didn’t seem to pick the parameters up from the command line to start discourse (FORCE_HOST=localhost etc), they were blank in rails.
rails c
SiteSetting.force_hostname = "localhost"
SiteSetting.port = 4200
exit
then avatar paths were localhost and not ip address after I restarted the site. Avatars still weren’t working though.
further investigation of logs as soon as I did an avatar import:
tail -n 200 log/development.log
revealed:
convert: no decode delegate for this image format jpeg:/home/bob/discourse/public/uploads/default/original/1X/92bb0d46e6a4b8a1333505b9d2da59a5ed1721ec.jpeg[0]' @ error/constitute.c/ReadImage/752.\nconvert: no images defined jpeg:/tmp/discourse-thumbnail20260202-4096-qjyo93.jpeg' @ error/deprecate.c/ConvertImageCommand/3368.\n">
and after some digging I found out that it was because I had installed imagemagick but not the jpeg delegates FIRST. uninstalled Imagemagick, installed jpeg delegates (and others):
restarted the discourse server and avatars instantly worked
I’m annoyed at myself for getting fixated on the ip/locahost url references instead of checking the basics….but there we go, I learned quite a bit in the last couple of days and it’s working now