Why is Rails boot so slow on macOS?

I don’t know if I’m doing something wrong, or if it’s the corporate antivirus (Microsoft Defender) fault, but on my Macbook Pro with M1 Rails it takes several dozen seconds, even up to 50 seconds! to boot. This of course may be the fault of some corporate security software, but I am on Ruby compiled for arm64:

ruby 3.1.3p185 (revision 1a6b16756e) [arm64-darwin22]
ruby 3.0.5p211 (revision ba5cf0f7c5) [arm64-darwin22]

in both cases launching bin/rails c took ~ 40-50 seconds today

1 Like