Users are encountering bootstrapping and runtime errors while setting up Discourse in development mode. manishramteke reports a TypeError from bootsnap involving Bignum vs Fixnum, likely due to Ruby version mismatch or cached artifacts; sam suggests clearing tmp/cache or disabling bootsnap as a workaround, which manishramteke confirms resolves the issue temporarily. Separately, joebuhlig and angus report letter avatar failures on macOS linked to ImageMagick 7.0.x; downgrading to ImageMagick 6.9.x (via brew switch or manual install) fixes the issue. ryanerwin confirms the same fix applies on Arch Linux by installing imagemagick6 instead of the newer 7.x version. The root causes appear to be version incompatibilities — Ruby/bootsnap cache and ImageMagick — with clear workarounds provided for each.
I think I have a related issue. I’m the proud owner of a brand new MacBook Pro and was setting up a new Discourse development environment. I followed @techAPJ’s how to for this to the letter. It all went perfect (well done, sir!) except for the letter avatars. They fail to load.
Following that error are the related error traces for the missing images. Essentially, it seems as though the image size it’s looking for isn’t being created on startup.
I tried rm -rf tmp and restarted locally but that made no difference.
UPDATE: I ran the sidekiq job for CreateMissingAvatars thinking that may help. It did bring in the system user avatar but it applied that to my user account as well. I would have expected a letter avatar instead. But maybe that resolved it?
UPDATE2: Sorry. Not resolved. Here’s the error:
No such file or directory @ rb_file_s_ctime - /Users/joebuhlig/Codebase/discourse/tmp/letter_avatars/5_9923d3d1b8ee4d0450f1275952f90f00/J/185_229_243/64.png
This to me sounds like a Ruby version thing… can you raise this on the bootsnap GitHub repo.
My guess, somehow you had version 2.2 installed, you started Discourse and built the cache in tmp/cache later you started running Ruby version 2.3 and it tried reading the 2.2 cache.
My first port-of-call would be rm -fr tmp/cache
If you need to workaround for now comment out bootsnap in app/boot.rb
I have been using ruby 2.3 as per dev install guide. Cleaning cache, installing dependencies and rerunning with ruby 2.3 did not work for me however commenting out bootsnap worked.
I will check on bootsnap thing, as you suggested. If I find solution will post it here.
Thanks for quick workaround. I am huge fan of discourse and team.
I was using imagemagick 7.0.x (current stable homebrew version).
/usr/local/Cellar/imagemagick/6.9.6-5 (1,493 files, 22.5MB)
Poured from bottle on 2016-11-20 at 00:08:07
/usr/local/Cellar/imagemagick/7.0.6-4 (1,522 files, 22.7MB) *
Poured from bottle on 2017-07-31 at 07:43:44
I switched to the 6.9.x version homebrew kept (see above)
brew switch imagemagick 6.9.6-5
Now letter avatars work as normal. No annoying errors.
For anyone else who runs into this same issue on Arch, the current imagemagick6 release will work, but imagemagick 7.x (current) still isn’t compatible… Specifically:
pacman -R imagemagick
pacman -S imagemagick6
Restart your rails server and all will be working fine.